From a49decc7d56bdb704a5d1580058c0da57e9a9353 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 22 Jun 2010 13:29:52 +0000 Subject: Fix cluster broker crashes when management is active. Cluser brokers were exiting with errors "modified cluster state outside cluster context" and "confirmed < (50+0) but only sent < (49+0)" Fix was to: - delay completion of incoming update till update connection closes. - delay addding new connections to managment until connection is announced. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@956882 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/ClusterSafe.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/sys/ClusterSafe.cpp') diff --git a/cpp/src/qpid/sys/ClusterSafe.cpp b/cpp/src/qpid/sys/ClusterSafe.cpp index e051591afd..6105fc96c7 100644 --- a/cpp/src/qpid/sys/ClusterSafe.cpp +++ b/cpp/src/qpid/sys/ClusterSafe.cpp @@ -43,8 +43,15 @@ void assertClusterSafe() { } } -ClusterSafeScope::ClusterSafeScope() { inContext = true; } -ClusterSafeScope::~ClusterSafeScope() { inContext = false; } +ClusterSafeScope::ClusterSafeScope() { + assert(!inContext); + inContext = true; +} + +ClusterSafeScope::~ClusterSafeScope() { + assert(inContext); + inContext = false; +} void enableClusterSafe() { inCluster = true; } -- cgit v1.2.1