Added try/catch and the callback back in transport-produce
This commit is contained in:
parent
1e8f8b6d9b
commit
f479aaa96f
9
app.js
9
app.js
@ -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}`)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// see client's socket.emit('transport-recv-connect', ...)
|
// see client's socket.emit('transport-recv-connect', ...)
|
||||||
|
Loading…
Reference in New Issue
Block a user