Refactor transportclose 3
This commit is contained in:
parent
e5fbb1e5a7
commit
7bb45dca19
10
app.js
10
app.js
@ -161,6 +161,11 @@ peers.on('connection', async socket => {
|
||||
closeRoom(callId);
|
||||
})
|
||||
|
||||
producer.on('transportclose', () => {
|
||||
console.log('transport2 for this producer closed', callId)
|
||||
closeRoom(callId);
|
||||
})
|
||||
|
||||
// Send back to the client the Producer's id
|
||||
callback({
|
||||
id: producer.id
|
||||
@ -192,6 +197,11 @@ peers.on('connection', async socket => {
|
||||
closeRoom(callId);
|
||||
})
|
||||
|
||||
consumer.on('transportclose', () => {
|
||||
console.log('transport2 close from consumer', callId)
|
||||
closeRoom(callId);
|
||||
})
|
||||
|
||||
consumer.on('producerclose', () => {
|
||||
console.log('producer of consumer closed')
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user