mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge #18452: qt: Fix shutdown when waitfor* cmds are called from RPC console
da73f1513aqt: Fix shutdown when waitfor* cmds are called from RPC console (Hennadii Stepanov) Pull request description: On master (7eed413e72), 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: utACKda73f1513aTree-SHA512: 469f5332945a5f2c57d19336cda5df79b123ccc494aea6d58a85eb1293be52708b2b9c5bb6bc2c402a90b7b4e9e8d7ab8fe84cf201cf7ce612c9290c57e43681
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user