fix: daemon doesn't quit when quitting the app for an auto-update (https://github.com/lbryio/lbry-app/issues/1142)

This fixes https://github.com/lbryio/lbry-app/issues/1142
This commit is contained in:
Igor Gassmann 2018-03-20 15:01:18 -04:00
parent 40a6ad0e1c
commit 07ee6b95b1

View file

@ -65,8 +65,8 @@ app.on('ready', async () => {
'For more information please visit: \n' +
'https://lbry.io/faq/startup-troubleshooting'
);
app.quit();
}
app.quit();
});
daemon.launch();
}
@ -111,7 +111,10 @@ app.on('will-quit', event => {
}
appState.isQuitting = true;
if (daemon) daemon.quit();
if (daemon) {
daemon.quit();
event.preventDefault();
}
});
// https://electronjs.org/docs/api/app#event-will-finish-launching