Shutdown daemon and close wallet properly on app exit

This commit is contained in:
Jaquee
2016-11-25 21:14:52 +01:00
parent 7876957b48
commit 8dfa79ec58
2 changed files with 16 additions and 7 deletions

View File

@@ -1053,12 +1053,13 @@ ApplicationWindow {
}
}
onClosing: {
// Close and save to disk on app close
if (currentWallet != undefined) {
walletManager.closeWallet(currentWallet);
currentWallet = undefined
}
// Stop daemon
daemonManager.stop();
// Make sure wallet is closed before app exit (~Wallet() isn't always invoked)
// Daemon shutdown is handled with signal/slot in main.cpp
if (currentWallet != undefined) {
walletManager.closeWallet(currentWallet);
currentWallet = undefined
}
// Stop daemon
daemonManager.stop();
}
}