From 6a1ce0d9b94f8c171f68724caf2d2bc8197a17c7 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 19 Sep 2013 15:08:34 +0200 Subject: [PATCH] cluster: Fix log replay. --- components/cluster/clustercomponent.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/cluster/clustercomponent.cpp b/components/cluster/clustercomponent.cpp index 0e9e0a1b0..ed777386f 100644 --- a/components/cluster/clustercomponent.cpp +++ b/components/cluster/clustercomponent.cpp @@ -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");