You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2008/09/26 21:41:44 UTC
svn commit: r699466 -
/incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp
Author: aconway
Date: Fri Sep 26 12:41:43 2008
New Revision: 699466
URL: http://svn.apache.org/viewvc?rev=699466&view=rev
Log:
Bugfix, tests were crashing.
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp?rev=699466&r1=699465&r2=699466&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp Fri Sep 26 12:41:43 2008
@@ -109,24 +109,25 @@
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()));