Hang up any active calls when quitting

This commit is contained in:
Jordan Rose 2021-11-30 07:36:20 -08:00 committed by GitHub
parent 563f016245
commit 7edf3763a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -1700,6 +1700,10 @@ app.on('before-quit', () => {
});
windowState.markShouldQuit();
if (mainWindow) {
mainWindow.webContents.send('quit');
}
});
// Quit when all windows are closed.

View File

@ -288,6 +288,12 @@ export class CallingClass {
uxActions.setPresenting();
});
ipcRenderer.on('quit', () => {
for (const conversationId of Object.keys(this.callsByConversation)) {
this.hangup(conversationId);
}
});
this.cleanExpiredGroupCallRingsAndLoop();
}