diff --git a/lib/remote/jsonrpcconnection.cpp b/lib/remote/jsonrpcconnection.cpp index f298bb075..c70b82d94 100644 --- a/lib/remote/jsonrpcconnection.cpp +++ b/lib/remote/jsonrpcconnection.cpp @@ -149,6 +149,10 @@ void JsonRpcConnection::WriteOutgoingMessages(boost::asio::yield_context yc) if (!queue.empty()) { try { for (auto& message : queue) { + if (m_ShuttingDown) { + break; + } + size_t bytesSent = JsonRpc::SendRawMessage(m_Stream, message, yc); if (m_Endpoint) {