mirror of https://github.com/Icinga/icinga2.git
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;
|
||||
}
|
||||
|
||||
NetString::WriteStringToStream(client->GetStream(), pmessage->Get("message"));
|
||||
count++;
|
||||
try {
|
||||
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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue