diff options
| author | Alan Conway <aconway@apache.org> | 2008-09-26 19:41:43 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-09-26 19:41:43 +0000 |
| commit | a49b642bf62a0e65b8f4116b7de0bb914cb09e44 (patch) | |
| tree | f99c45675d481cc27840ee6e7f7ebfc5b1f49985 /qpid/cpp | |
| parent | c7ec5009384fabc578023430f88426c8644c712f (diff) | |
| download | qpid-python-a49b642bf62a0e65b8f4116b7de0bb914cb09e44.tar.gz | |
Bugfix, tests were crashing.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@699466 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/qpid/cluster/Connection.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/qpid/cpp/src/qpid/cluster/Connection.cpp b/qpid/cpp/src/qpid/cluster/Connection.cpp index 0db4a01f3f..21eec0f86e 100644 --- a/qpid/cpp/src/qpid/cluster/Connection.cpp +++ b/qpid/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())); |
