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 2010/07/08 17:40:02 UTC
svn commit: r961814 - /qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp
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