diff --git a/lib/remote/jsonrpcconnection.cpp b/lib/remote/jsonrpcconnection.cpp index 253d0e38e2..38afd51167 100644 --- a/lib/remote/jsonrpcconnection.cpp +++ b/lib/remote/jsonrpcconnection.cpp @@ -121,6 +121,10 @@ void JsonRpcConnection::WriteOutgoingMessages(boost::asio::yield_context yc) } } + if (m_ShuttingDown) { + return; + } + m_Stream->async_flush(yc); } catch (const std::exception& ex) { Log(m_ShuttingDown ? LogDebug : LogWarning, "JsonRpcConnection")