Added try/catch and the callback back in transport-produce

This commit is contained in:
Sergiu Toma 2022-09-03 09:13:10 +03:00
parent 1e8f8b6d9b
commit f479aaa96f

9
app.js
View File

@ -167,6 +167,15 @@ peers.on('connection', async socket => {
router[callId].close()
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}`)
}
})
// see client's socket.emit('transport-recv-connect', ...)