From 33e2bc4b0925e86417c41e5a4569393cdaae2a03 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 8 Jul 2010 15:40:01 +0000 Subject: 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 --- qpid/cpp/src/qpid/cluster/Connection.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qpid/cpp/src') 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 @@ -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() { -- cgit v1.2.1