summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-09-26 19:41:43 +0000
committerAlan Conway <aconway@apache.org>2008-09-26 19:41:43 +0000
commit1f1cb9cb6150d5174898a95c6c27ae8d631147d9 (patch)
tree26bca5426cace17c870a02cf08c7285127eaec9a /cpp
parent44366590caa13db09e55e2c853bd66b363558fa7 (diff)
downloadqpid-python-1f1cb9cb6150d5174898a95c6c27ae8d631147d9.tar.gz
Bugfix, tests were crashing.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@699466 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/cluster/Connection.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp
index 0db4a01f3f..21eec0f86e 100644
--- a/cpp/src/qpid/cluster/Connection.cpp
+++ b/cpp/src/qpid/cluster/Connection.cpp
@@ -109,24 +109,25 @@ void Connection::closed() {
cluster.catchUpClosed(boost::intrusive_ptr<Connection>(this));
if (isShadow())
catchUp = false;
- else
+ else {
connection.closed();
- }
- else {
- // Local network connection has closed. We need to keep the
- // connection around but replace the output handler with a
- // no-op handler as the network output handler will be
- // deleted.
- output.setOutputHandler(discardHandler);
-
- if (isLocal()) {
- // This was a local replicated connection. Multicast a deliver
- // closed and process any outstanding frames from the cluster
- // until self-delivery of deliver-close.
- cluster.mcastControl(ClusterConnectionDeliverCloseBody(), this);
- ++mcastSeq;
+ return;
}
}
+
+ // Local network connection has closed. We need to keep the
+ // connection around but replace the output handler with a
+ // no-op handler as the network output handler will be
+ // deleted.
+ output.setOutputHandler(discardHandler);
+
+ if (isLocal() && !catchUp) {
+ // This was a local replicated connection. Multicast a deliver
+ // closed and process any outstanding frames from the cluster
+ // until self-delivery of deliver-close.
+ cluster.mcastControl(ClusterConnectionDeliverCloseBody(), this);
+ ++mcastSeq;
+ }
}
catch (const std::exception& e) {
QPID_LOG(error, QPID_MSG("While closing connection: " << e.what()));