aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-03-27 20:29:20 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-05-13 16:14:04 +0300
commitda73f1513a637a9f347b64de66564d6cdb2541f8 (patch)
tree80576a5b81b17858d82b11f2d0163c12303b13bd /src/interfaces
parenta33901cb6d82e2f75aab67f80a8852b7e6e9817a (diff)
downloadbitcoin-da73f1513a637a9f347b64de66564d6cdb2541f8.tar.xz
qt: Fix shutdown when waitfor* cmds are called from RPC console
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/node.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
index 9e603a12cd..91ed1dc72f 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -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
{