From dfa09c70f5049c9b4d6cff21642e82ad6c1342fd Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Thu, 16 Aug 2018 11:33:54 +0200 Subject: [PATCH] fix(app): simplify app quit process Remove redundant code relating to the app close/quit process. --- app/lib/zap/controller.js | 3 --- app/main.dev.js | 12 ------------ 2 files changed, 15 deletions(-) diff --git a/app/lib/zap/controller.js b/app/lib/zap/controller.js index 9c1cee80..b5c0162e 100644 --- a/app/lib/zap/controller.js +++ b/app/lib/zap/controller.js @@ -199,9 +199,6 @@ class ZapController { if (this.neutrino) { this.neutrino.stop() } - - // Give the grpc connections a chance to be properly closed out. - return new Promise(resolve => setTimeout(resolve, 200)) } onTerminate() { diff --git a/app/main.dev.js b/app/main.dev.js index 1765d7de..090a9a98 100644 --- a/app/main.dev.js +++ b/app/main.dev.js @@ -99,18 +99,6 @@ app.on('ready', () => { } }) - /** - * Add application event listener: - * - quit app when window is closed - */ - app.on('window-all-closed', () => { - mainLog.debug('app.window-all-closed') - // Respect the OSX convention of having the application in memory even after all windows have been closed - if (process.platform !== 'darwin') { - app.quit() - } - }) - /** * Add application event listener: * - Stop gRPC and kill lnd process before the app windows are closed and the app quits.