From f6e32031985522aa093b4c91f1dc21be5eddf403 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Thu, 11 Aug 2022 15:03:00 +0300 Subject: [PATCH] Refactor transportclose 15 --- app.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index 28d9e64..189bbec 100644 --- a/app.js +++ b/app.js @@ -159,9 +159,9 @@ peers.on('connection', async socket => { producer.on('transportclose', () => { console.log('transport for this producer closed ') - closeRoom(callId) - // producer.close() - // delete router[callId] + // closeRoom(callId) + producer.close() + delete router[callId] }) // Send back to the client the Producer's id @@ -192,8 +192,8 @@ peers.on('connection', async socket => { consumer.on('transportclose', () => { console.log('transport close from consumer', callId) - closeRoom(callId) - // delete router[callId] + // closeRoom(callId) + delete router[callId] }) consumer.on('producerclose', () => {