Merge pull request #10221 from Icinga/Al2Klimov-patch-7

JsonRpcConnection: don't write new messages on shutdown
This commit is contained in:
Alexander Aleksandrovič Klimov 2024-11-29 09:24:10 +01:00 committed by GitHub
commit 8f51f54f19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

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