aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2020-05-29 15:49:37 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2020-05-29 15:49:46 +0200
commite4bfd51acc111c27f8a808756f88738b02388c38 (patch)
tree9f9e461cbeea74104171dfdffa2343c25fc5d9ae /src/interfaces
parentf2e2c5ebcccf8d656b850c28452e6e652934f36b (diff)
parentda73f1513a637a9f347b64de66564d6cdb2541f8 (diff)
downloadbitcoin-e4bfd51acc111c27f8a808756f88738b02388c38.tar.xz
Merge #18452: qt: Fix shutdown when waitfor* cmds are called from RPC console
da73f1513a637a9f347b64de66564d6cdb2541f8 qt: Fix shutdown when waitfor* cmds are called from RPC console (Hennadii Stepanov) Pull request description: On master (7eed413e72a236b6f1475a198f7063fd24929e23), if the GUI has been started with`-server=1`, `bitcoin-qt` hangs on shutdown during calling any of the `waitfor*` commands in the GUI RPC console. This PR suggests minimal changes to fix this bug. Fix #17495 ACKs for top commit: jonasschnelli: utACK da73f1513a637a9f347b64de66564d6cdb2541f8 Tree-SHA512: 469f5332945a5f2c57d19336cda5df79b123ccc494aea6d58a85eb1293be52708b2b9c5bb6bc2c402a90b7b4e9e8d7ab8fe84cf201cf7ce612c9290c57e43681
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 ca1435fe60..bd1b36fea5 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -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
{