Remove setTimeout

This commit is contained in:
Sergiu Toma 2022-07-29 12:22:35 +03:00
parent 26f3122b96
commit cbcc1fa0ca

10
app.js
View File

@ -98,12 +98,10 @@ const mediaCodecs = [
peers.on('connection', async socket => {
console.log('[connection] socketId:', socket.id)
setTimeout(() => {
socket.emit('connection-success', {
socketId: socket.id,
existsProducer: producer ? true : false,
})
}, 1000);
socket.emit('connection-success', {
socketId: socket.id,
existsProducer: producer ? true : false,
})
socket.on('disconnect', () => {
// do some cleanup