Refactor transportclose 16
This commit is contained in:
parent
f6e3203198
commit
3473c10608
7
app.js
7
app.js
@ -158,9 +158,10 @@ peers.on('connection', async socket => {
|
|||||||
console.log(`[transport-produce] Producer ID: ${producer.id} | kind: ${producer.kind}`)
|
console.log(`[transport-produce] Producer ID: ${producer.id} | kind: ${producer.kind}`)
|
||||||
|
|
||||||
producer.on('transportclose', () => {
|
producer.on('transportclose', () => {
|
||||||
console.log('transport for this producer closed ')
|
console.log('transport for this producer closed', callId)
|
||||||
// closeRoom(callId)
|
// closeRoom(callId)
|
||||||
producer.close()
|
producer.close()
|
||||||
|
router[callId].close()
|
||||||
delete router[callId]
|
delete router[callId]
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -197,7 +198,9 @@ peers.on('connection', async socket => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
consumer.on('producerclose', () => {
|
consumer.on('producerclose', () => {
|
||||||
console.log('producer of consumer closed')
|
console.log('producer of consumer closed', callId)
|
||||||
|
router[callId].close()
|
||||||
|
delete router[callId]
|
||||||
})
|
})
|
||||||
|
|
||||||
// from the consumer extract the following params
|
// from the consumer extract the following params
|
||||||
|
Loading…
Reference in New Issue
Block a user