Fix call check before call close()
This commit is contained in:
parent
b0fad5f1db
commit
a4d16998cd
6
app.js
6
app.js
@ -112,9 +112,9 @@ const closeCall = (callId) => {
|
||||
if (videoCalls[callId]) {
|
||||
videoCalls[callId].producer?.close();
|
||||
videoCalls[callId].consumer?.close();
|
||||
videoCalls[callId]?.consumerTransport.close();
|
||||
videoCalls[callId]?.producerTransport.close();
|
||||
videoCalls[callId].router.close();
|
||||
videoCalls[callId]?.consumerTransport?.close();
|
||||
videoCalls[callId]?.producerTransport?.close();
|
||||
videoCalls[callId]?.router?.close();
|
||||
delete videoCalls[callId];
|
||||
} else {
|
||||
console.log(`The call with id ${callId} has already been deleted`);
|
||||
|
Loading…
Reference in New Issue
Block a user