qt: Fix shutdown when waitfor* cmds are called from RPC console

This commit is contained in:
Hennadii Stepanov
2020-03-27 20:29:20 +02:00
parent a33901cb6d
commit da73f1513a
2 changed files with 27 additions and 8 deletions

View File

@@ -87,7 +87,15 @@ public:
Interrupt(m_context);
Shutdown(m_context);
}
void startShutdown() override { StartShutdown(); }
void startShutdown() override
{
StartShutdown();
// Stop RPC for clean shutdown if any of waitfor* commands is executed.
if (gArgs.GetBoolArg("-server", false)) {
InterruptRPC();
StopRPC();
}
}
bool shutdownRequested() override { return ShutdownRequested(); }
void mapPort(bool use_upnp) override
{