summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-07-08 15:40:01 +0000
committerAlan Conway <aconway@apache.org>2010-07-08 15:40:01 +0000
commit33e2bc4b0925e86417c41e5a4569393cdaae2a03 (patch)
treecd9ac19d12c50432f544dc0d46c9e9b382fa2aaa
parentf2589d816a0919c1a687548acc546bc6bb6da857 (diff)
downloadqpid-python-33e2bc4b0925e86417c41e5a4569393cdaae2a03.tar.gz
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. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@961814 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/cluster/Connection.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/cluster/Connection.cpp b/qpid/cpp/src/qpid/cluster/Connection.cpp
index f6cccf06a2..ee296d7f35 100644
--- a/qpid/cpp/src/qpid/cluster/Connection.cpp
+++ b/qpid/cpp/src/qpid/cluster/Connection.cpp
@@ -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() {