Skip to content

Commit

Permalink
JsonRpcConnection: don't write any data on shutdown
Browse files Browse the repository at this point in the history
In fact, this is already done for the outer loop (for each bulk), just not yet for the inner one (for each message of a bulk). So once the remote signals EOF, don't try to get things done until write error (which can't be associated with a particular message anyway, due to buffering), but just let the peer go.
  • Loading branch information
Al2Klimov authored Nov 5, 2024
1 parent d894792 commit aad1e76
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/remote/jsonrpcconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ void JsonRpcConnection::WriteOutgoingMessages(boost::asio::yield_context yc)
if (m_Endpoint) {
m_Endpoint->AddMessageSent(bytesSent);
}

if (m_ShuttingDown) {
return;
}
}

m_Stream->async_flush(yc);
Expand Down

0 comments on commit aad1e76

Please sign in to comment.