diff options
| author | Alan Conway <aconway@apache.org> | 2008-10-14 18:21:50 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-10-14 18:21:50 +0000 |
| commit | b17ea7f64cf3eb42c4614aa57508a7aaca132807 (patch) | |
| tree | 3f79c52e3b96a19cb0ce6b591b5ea64284c41cad /cpp/src/qpid/cluster | |
| parent | 8ec6597d5372ccebb689483b8074085f278022e1 (diff) | |
| download | qpid-python-b17ea7f64cf3eb42c4614aa57508a7aaca132807.tar.gz | |
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
Diffstat (limited to 'cpp/src/qpid/cluster')
| -rw-r--r-- | cpp/src/qpid/cluster/Cluster.cpp | 8 | ||||
| -rw-r--r-- | cpp/src/qpid/cluster/ClusterMap.cpp | 2 |
2 files changed, 8 insertions, 2 deletions
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); } diff --git a/cpp/src/qpid/cluster/ClusterMap.cpp b/cpp/src/qpid/cluster/ClusterMap.cpp index e2fc25bfaa..f8c5695b23 100644 --- a/cpp/src/qpid/cluster/ClusterMap.cpp +++ b/cpp/src/qpid/cluster/ClusterMap.cpp @@ -146,7 +146,7 @@ boost::optional<Url> ClusterMap::dumpOffer(const MemberId& from, const MemberId& newbies.erase(i); // No longer a potential dumpee. return url; } - return boost::none; + return boost::optional<Url>(); } }} // namespace qpid::cluster |
