Create new rpc connection during shutdown if we don't have one and debug logging
This commit is contained in:
@@ -1987,6 +1987,11 @@ void Controller::refreshHUSHPrice()
|
||||
void Controller::shutdownhushd()
|
||||
{
|
||||
// Save the wallet and exit the lightclient library cleanly.
|
||||
if (!zrpc) {
|
||||
zrpc = new LiteInterface();
|
||||
qDebug() << __func__ << ": created new rpc connection zrpc=" << zrpc;
|
||||
}
|
||||
|
||||
if (zrpc && zrpc->haveConnection())
|
||||
{
|
||||
QDialog d(main);
|
||||
@@ -2018,13 +2023,13 @@ void Controller::shutdownhushd()
|
||||
if (!finished)
|
||||
d.accept();
|
||||
finished = true;
|
||||
qDebug() << "saveWallet during shutdownhushd";
|
||||
qDebug() << __func__ << ": saveWallet finished";
|
||||
});
|
||||
|
||||
if (!finished)
|
||||
d.exec();
|
||||
} else {
|
||||
qDebug() << "No zrpc object, unclean shutdown and unable to call saveWallet!";
|
||||
qDebug() << __func__ << ": No zrpc object, unclean shutdown and unable to call saveWallet!";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user