From 07ee6b95b1ce8f29fcdf7d3901971d3d07a4d119 Mon Sep 17 00:00:00 2001 From: Igor Gassmann Date: Tue, 20 Mar 2018 15:01:18 -0400 Subject: [PATCH] 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 --- src/main/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index 4f7e9dcdf..a456fcd5a 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -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