mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
ELECTRON-816: add checks for crash events when it is killed (#544)
Currently on Windows, when the app is killed, a crash event is emitted which sends the wrong signal to the user that the app actually crashed which isn't the case because the app was in fact killed. So, this PR adds an extra check to see if the app was killed and shows the crash dialog based on that.
This commit is contained in:
committed by
GitHub
parent
0bb617aab3
commit
28d9826236
@@ -111,7 +111,14 @@ function openBasicAuthWindow(windowName, hostname, isValidCredentials, clearSett
|
||||
}
|
||||
});
|
||||
|
||||
basicAuthWindow.webContents.on('crashed', function () {
|
||||
basicAuthWindow.webContents.on('crashed', function (event, killed) {
|
||||
|
||||
log.send(logLevels.INFO, `Basic Auth Window crashed! Killed? ${killed}`);
|
||||
|
||||
if (killed) {
|
||||
return;
|
||||
}
|
||||
|
||||
const options = {
|
||||
type: 'error',
|
||||
title: i18n.getMessageFor('Renderer Process Crashed'),
|
||||
@@ -167,4 +174,4 @@ function closeAuthWindow(clearSettings) {
|
||||
|
||||
module.exports = {
|
||||
openBasicAuthWindow: openBasicAuthWindow
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user