Remove setTimeout
This commit is contained in:
parent
26f3122b96
commit
cbcc1fa0ca
10
app.js
10
app.js
@ -98,12 +98,10 @@ const mediaCodecs = [
|
|||||||
|
|
||||||
peers.on('connection', async socket => {
|
peers.on('connection', async socket => {
|
||||||
console.log('[connection] socketId:', socket.id)
|
console.log('[connection] socketId:', socket.id)
|
||||||
setTimeout(() => {
|
socket.emit('connection-success', {
|
||||||
socket.emit('connection-success', {
|
socketId: socket.id,
|
||||||
socketId: socket.id,
|
existsProducer: producer ? true : false,
|
||||||
existsProducer: producer ? true : false,
|
})
|
||||||
})
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
socket.on('disconnect', () => {
|
socket.on('disconnect', () => {
|
||||||
// do some cleanup
|
// do some cleanup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user