Browse Source
fix(app): simplify app quit process
Remove redundant code relating to the app close/quit process.
renovate/lint-staged-8.x
Tom Kirkpatrick
7 years ago
No known key found for this signature in database
GPG Key ID: 72203A8EC5967EA8
2 changed files with
0 additions and
15 deletions
-
app/lib/zap/controller.js
-
app/main.dev.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() { |
|
|
|
|
|
@ -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. |
|
|
|