cluster: Fix log replay.

This commit is contained in:
Gunnar Beutner 2013-09-19 15:08:34 +02:00
parent 74a4432bad
commit 6a1ce0d9b9
1 changed files with 4 additions and 2 deletions

View File

@ -438,6 +438,8 @@ void ClusterComponent::ReplayLog(const Endpoint::Ptr& endpoint, const Stream::Pt
if (!NetString::ReadStringFromStream(lstream, &message))
break;
} catch (std::exception&) {
Log(LogWarning, "cluster", "Unexpected end-of-file for cluster log: " + path);
/* Log files may be incomplete or corrupted. This is perfectly OK. */
break;
}
@ -460,7 +462,7 @@ void ClusterComponent::ReplayLog(const Endpoint::Ptr& endpoint, const Stream::Pt
if (!dtype) {
Log(LogWarning, "cluster", "Invalid type in security attribute: " + type);
return;
continue;
}
String name = security->Get("name");
@ -468,7 +470,7 @@ void ClusterComponent::ReplayLog(const Endpoint::Ptr& endpoint, const Stream::Pt
if (!secobj) {
Log(LogWarning, "cluster", "Invalid object name in security attribute: " + name + " (of type '" + type + "')");
return;
continue;
}
privs = security->Get("privs");