diff options
author | Alan Conway <aconway@apache.org> | 2010-07-08 15:40:01 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-07-08 15:40:01 +0000 |
commit | cb5366c6e3f1e650a6bd600fe69dc23437b48a8f (patch) | |
tree | a94db7d72517c7fe14c8233c52ff9df4ba28902c /cpp | |
parent | c5442458cc7f2b407cbf9ae0248cdf2b8397a995 (diff) | |
download | qpid-python-cb5366c6e3f1e650a6bd600fe69dc23437b48a8f.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/qpid@961814 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/cluster/Connection.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index f6cccf06a2..ee296d7f35 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/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() { |