Merge e4bfd51acc into merged_master (Bitcoin PR #18452)

This commit is contained in:
Andrew Poelstra 2020-11-26 01:08:53 +00:00
commit f15555c2f6
2 changed files with 27 additions and 8 deletions

View file

@ -88,7 +88,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
{