From: Gunnar Beutner Date: Tue, 17 Sep 2013 12:32:37 +0000 (+0200) Subject: cluster: Fix deadlock. X-Git-Tag: v0.0.3~495 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20ac2825e9270d7b821b51a2e209b5d6cf4312d7;p=icinga2 cluster: Fix deadlock. --- diff --git a/components/cluster/clustercomponent.cpp b/components/cluster/clustercomponent.cpp index 613d467bf..4fc1fbfe1 100644 --- a/components/cluster/clustercomponent.cpp +++ b/components/cluster/clustercomponent.cpp @@ -1354,6 +1354,7 @@ void ClusterComponent::MessageHandler(const Endpoint::Ptr& sender, const Diction localConfig->Remove(hash); } + olock.Unlock(); ObjectLock olock2(localConfig); BOOST_FOREACH(boost::tie(key, boost::tuples::ignore), localConfig) { @@ -1362,6 +1363,7 @@ void ClusterComponent::MessageHandler(const Endpoint::Ptr& sender, const Diction (void) unlink(path.CStr()); configChange = true; } + olock2.Unlock(); if (configChange) { Log(LogInformation, "cluster", "Restarting after configuration change.");