Commit 78b80792 authored by Pieterjan Vanhoof's avatar Pieterjan Vanhoof Committed by GitHub

Merge pull request #281 from stratisproject/design

Call daemon shutdown on quit
parents 9f91e4ce b108fb60
...@@ -61,8 +61,6 @@ function createWindow() { ...@@ -61,8 +61,6 @@ function createWindow() {
// Emitted when the window is going to close. // Emitted when the window is going to close.
mainWindow.on('close', function () { mainWindow.on('close', function () {
closeBitcoinApi(),
closeStratisApi();
}) })
}; };
...@@ -84,12 +82,16 @@ app.on('ready', function () { ...@@ -84,12 +82,16 @@ app.on('ready', function () {
} }
}); });
app.on('will-quit', function () {
closeBitcoinApi(),
closeStratisApi();
});
// Quit when all windows are closed. // Quit when all windows are closed.
app.on('window-all-closed', function () { app.on('window-all-closed', function () {
// On OS X it is common for applications and their menu bar // On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q // to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') { if (process.platform !== 'darwin') {
//apiProcess.kill();
app.quit(); app.quit();
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment