qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r961814 - /qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp
Date Thu, 08 Jul 2010 15:40:02 GMT
Author: aconway
Date: Thu Jul  8 15:40:01 2010
New Revision: 961814

URL: http://svn.apache.org/viewvc?rev=961814&view=rev
Log:
Fix cluster-safe assertion in ~Connection.

Don't trigger cluster-safe asserts in broker::~Connection as it can be
called from an IO threads during broker shutdown.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp?rev=961814&r1=961813&r2=961814&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp Thu Jul  8 15:40:01 2010
@@ -41,6 +41,7 @@
 #include "qpid/framing/ConnectionCloseBody.h"
 #include "qpid/framing/ConnectionCloseOkBody.h"
 #include "qpid/log/Statement.h"
+#include "qpid/sys/ClusterSafe.h"
 #include "qpid/management/ManagementAgent.h"
 #include <boost/current_function.hpp>
 
@@ -168,6 +169,11 @@ void Connection::announce(
 
 Connection::~Connection() {
     if (connection.get()) connection->setErrorListener(0);
+    // Don't trigger cluster-safe asserts in broker:: ~Connection as
+    // it may be called in an IO thread context during broker
+    // shutdown.
+    sys::ClusterSafeScope css;
+    connection.reset();
 }
 
 bool Connection::doOutput() {



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message