mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 16:14:09 +02:00
Handle exceptions for NetString::WriteStringToStream in ApiListener::ReplayLog
fixes #10455
This commit is contained in:
parent
6ab779ebdc
commit
618e031f46
@ -824,8 +824,14 @@ void ApiListener::ReplayLog(const JsonRpcConnection::Ptr& client)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
NetString::WriteStringToStream(client->GetStream(), pmessage->Get("message"));
|
try {
|
||||||
count++;
|
NetString::WriteStringToStream(client->GetStream(), pmessage->Get("message"));
|
||||||
|
count++;
|
||||||
|
} catch (const std::exception& ex) {
|
||||||
|
Log(LogWarning, "ApiListener")
|
||||||
|
<< "Error while replaying log for endpoint '" << endpoint->GetName() << "': " << DiagnosticInformation(ex);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
peer_ts = pmessage->Get("timestamp");
|
peer_ts = pmessage->Get("timestamp");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user