Handle exceptions for NetString::WriteStringToStream in ApiListener::ReplayLog

fixes #10455
This commit is contained in:
Gunnar Beutner 2015-10-26 07:56:58 +01:00
parent 6ab779ebdc
commit 618e031f46
1 changed files with 8 additions and 2 deletions

View File

@ -824,8 +824,14 @@ void ApiListener::ReplayLog(const JsonRpcConnection::Ptr& client)
continue;
}
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");