Refactor transportclose 12

This commit is contained in:
Sergiu Toma 2022-08-11 14:43:58 +03:00
parent 0f1c268fa5
commit cd8153e3e7

4
app.js
View File

@ -160,7 +160,7 @@ peers.on('connection', async socket => {
producer.on('transportclose', () => { producer.on('transportclose', () => {
console.log('transport for this producer closed ') console.log('transport for this producer closed ')
producer.close() producer.close()
router[callId] = null delete router[callId]
}) })
// Send back to the client the Producer's id // Send back to the client the Producer's id
@ -191,7 +191,7 @@ peers.on('connection', async socket => {
consumer.on('transportclose', () => { consumer.on('transportclose', () => {
console.log('transport close from consumer', callId) console.log('transport close from consumer', callId)
router[callId] = null delete router[callId]
}) })
consumer.on('producerclose', () => { consumer.on('producerclose', () => {