From b17ea7f64cf3eb42c4614aa57508a7aaca132807 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 14 Oct 2008 18:21:50 +0000 Subject: Bug fixes for client-side failover. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@704596 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Cluster.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/cluster/Cluster.cpp') diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index d63ad9646b..edf23683ae 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/cpp/src/qpid/cluster/Cluster.cpp @@ -163,7 +163,10 @@ void Cluster::mcastBuffer(const char* data, size_t size, const ConnectionId& con void Cluster::mcast(const Event& e) { Lock l(lock); mcast(e, l); } void Cluster::mcast(const Event& e, Lock&) { - if (state == LEFT) return; + if (state == LEFT) { + lock.notifyAll(); // threads waiting in getUrls() + return; + } if (state < READY && e.isConnection()) { // Stall outgoing connection events. QPID_LOG(trace, *this << " MCAST deferred: " << e ); @@ -351,6 +354,7 @@ void Cluster::configChange ( map = ClusterMap(memberId, myUrl, true); memberUpdate(l); unstall(l); + lock.notifyAll(); // threads waiting in getUrls() } else { // Joining established group. state = NEWBIE; @@ -417,6 +421,8 @@ void Cluster::dumpRequest(const MemberId& id, const std::string& url, Lock& l) { void Cluster::ready(const MemberId& id, const std::string& url, Lock& l) { map.ready(id, Url(url)); + if (id == memberId) + lock.notifyAll(); // threads waiting in getUrls() memberUpdate(l); } -- cgit v1.2.1