After calling any of the `waitfor*` commands in the GUI RPC console, trying to shutdown / `bitcoin-cli stop` will hang `bitcoin-qt`.
{
        m_context.chain = MakeChain(m_context);
        return AppInitMain(m_context_ref, m_context);
    }
    void appShutdown() override
    {
        Interrupt(m_context);
        Shutdown(m_context);
    }
    void startShutdown() override { StartShutdown(); }
    bool shutdownRequested() override { return ShutdownRequested(); }
    void mapPort(bool use_upnp) override
    {
        if (use_upnp) {
            StartMapPort();
        } else {
            InterruptMapPort();
            StopMapPort();
        }
    }
    void setupServerArgs() override { return SetupServerArgs(m_context); }
    bool getProxy(Network net, proxyType& proxy_info) override { return GetProxy(net, proxy_info); }
    size_t getNodeCount(CConnman::NumConnections flags) override
    {
        return m_context.connman ? m_context.connman->GetNodeCount(flags) : 0;
    }
    bool getNodesStats(NodesStats& stats) override