Merge pull request #10295 from Icinga/do-not-write-new-messages-on-shutdown

JsonRpcConnection: don't write new messages on shutdown
This commit is contained in:
Yonas Habteab 2025-01-13 13:11:17 +01:00 committed by GitHub
commit 7defb0c942
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) {