From f479aaa96fa49398456725a53b622da0c1711341 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Sat, 3 Sep 2022 09:13:10 +0300 Subject: [PATCH] Added try/catch and the callback back in transport-produce --- app.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app.js b/app.js index abd804e..ea1b705 100644 --- a/app.js +++ b/app.js @@ -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', ...)