diff options
| author | Hennadii Stepanov <[email protected]> | 2020-03-27 20:29:20 +0200 |
|---|---|---|
| committer | Hennadii Stepanov <[email protected]> | 2020-05-13 16:14:04 +0300 |
| commit | da73f1513a637a9f347b64de66564d6cdb2541f8 (patch) | |
| tree | 80576a5b81b17858d82b11f2d0163c12303b13bd /src/interfaces/node.cpp | |
| parent | Merge #18814: rpc: Relock wallet only if most recent callback (diff) | |
| download | discoin-da73f1513a637a9f347b64de66564d6cdb2541f8.tar.xz discoin-da73f1513a637a9f347b64de66564d6cdb2541f8.zip | |
qt: Fix shutdown when waitfor* cmds are called from RPC console
Diffstat (limited to 'src/interfaces/node.cpp')
| -rw-r--r-- | src/interfaces/node.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp index 9e603a12c..91ed1dc72 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 { |