diff --git a/src/main/index.js b/src/main/index.js index 6c95a0a..8d4443f 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -72,10 +72,13 @@ const createMainWindow = () => { // quit application when all windows are closed app.on('window-all-closed', () => { - telemetry.appWillClose(); app.quit(); }); +app.on('will-quit', () => { + telemetry.appWillClose(); +}); + // global reference to mainWindow (necessary to prevent window from being garbage collected) let _mainWindow;