WIP: router-close-connections #2

Closed
sergiu wants to merge 13 commits from router-close-connections into master
Showing only changes of commit f479aaa96f - Show all commits

9
app.js
View File

@ -167,6 +167,15 @@ peers.on('connection', async socket => {
router[callId].close() router[callId].close()
delete router[callId] delete router[callId]
}) })
try {
// Send back to the client the Producer's id
callback({
id: producer.id
})
} catch (error) {
console.log(`ERROR | transport-produce | ${error}`)
}
}) })
Review

Isn't the producer a global variable?

What should the client do with the producer id? Looks below that is sent back to server, why?

Isn't the `producer` a global variable? What should the client do with the producer id? Looks below that is sent back to server, why?
// see client's socket.emit('transport-recv-connect', ...) // see client's socket.emit('transport-recv-connect', ...)