diff options
| author | Alan Conway <aconway@apache.org> | 2009-04-14 14:19:12 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-04-14 14:19:12 +0000 |
| commit | df6517b6513aa8278e5feb1b1759da39f50dfc55 (patch) | |
| tree | 54d021e408564d5e42254e4cb3a77d6314153a3e /cpp/src/qpid/cluster | |
| parent | 9248d2b88fe09eb5b906f766b5350f9ca9ac394b (diff) | |
| download | qpid-python-df6517b6513aa8278e5feb1b1759da39f50dfc55.tar.gz | |
Fix regression: close shadow connections belonging to brokers that have left the cluster.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@764783 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster')
| -rw-r--r-- | cpp/src/qpid/cluster/Cluster.cpp | 4 | ||||
| -rw-r--r-- | cpp/src/qpid/cluster/Connection.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index ca325dde36..ff72c6032e 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/cpp/src/qpid/cluster/Cluster.cpp @@ -611,13 +611,13 @@ void Cluster::memberUpdate(Lock& l) { mgmtObject->set_memberIDs(idstr); } - // Erase connections belonging to members that have left the cluster. + // Close connections belonging to members that have left the cluster. ConnectionMap::iterator i = connections.begin(); while (i != connections.end()) { ConnectionMap::iterator j = i++; MemberId m = j->second->getId().getMember(); if (m != self && !map.isMember(m)) - connections.erase(j); + j->second->deliverClose(); } } diff --git a/cpp/src/qpid/cluster/Connection.h b/cpp/src/qpid/cluster/Connection.h index 49839a456b..414e5c935f 100644 --- a/cpp/src/qpid/cluster/Connection.h +++ b/cpp/src/qpid/cluster/Connection.h @@ -151,6 +151,8 @@ class Connection : void giveReadCredit(int credit); + void deliverClose(); + private: struct NullFrameHandler : public framing::FrameHandler { void handle(framing::AMQFrame&) {} @@ -165,7 +167,6 @@ class Connection : void init(); bool checkUnsupported(const framing::AMQBody& body); - void deliverClose(); void deliverDoOutput(uint32_t requested); void sendDoOutput(); |
