From 235efa107b083faa590169b496a4feea00689c86 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 16 Sep 2013 10:00:06 +0200 Subject: [PATCH] cluster: Yet another fix. --- components/cluster/clustercomponent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/cluster/clustercomponent.cpp b/components/cluster/clustercomponent.cpp index 4ef5a72db..031fade31 100644 --- a/components/cluster/clustercomponent.cpp +++ b/components/cluster/clustercomponent.cpp @@ -324,7 +324,7 @@ void ClusterComponent::LogGlobHandler(std::vector& files, const String& fil void ClusterComponent::ReplayLog(const Endpoint::Ptr& endpoint, const Stream::Ptr& stream) { - int count = 0; + int count = -1; double peer_ts = endpoint->GetLocalLogPosition(); bool last_sync = false; @@ -340,7 +340,7 @@ void ClusterComponent::ReplayLog(const Endpoint::Ptr& endpoint, const Stream::Pt Utility::Glob(GetClusterDir() + "log/*", boost::bind(&ClusterComponent::LogGlobHandler, boost::ref(files), _1)); std::sort(files.begin(), files.end()); - if (count == 0 || count > 50000) { + if (count == -1 || count > 50000) { OpenLogFile(); olock.Unlock(); } else { -- 2.40.0