Author: aconway
Date: Tue Sep 11 15:34:53 2012
New Revision: 1383452

URL: http://svn.apache.org/viewvc?rev=1383452&view=rev
Log:
NO-JIRA: Fix race in Connection, management object deleted while in use.

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

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp?rev=1383452&r1=1383451&r2=1383452&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp Tue Sep 11 15:34:53 2012
@@ -138,13 +138,13 @@ void Connection::requestIOProcessing(boo
 Connection::~Connection()
 {
     if (mgmtObject != 0) {
-        mgmtObject->resourceDestroy();
         // In a cluster, Connections destroyed during shutdown are in
         // a cluster-unsafe context. Don't raise an event in that case.
         if (!link && isClusterSafe())
             agent->raiseEvent(_qmf::EventClientDisconnect(mgmtId, 
ConnectionState::getUserId(), mgmtObject->get_remoteProperties()));
         QPID_LOG_CAT(debug, model, "Delete connection. user:" << 
ConnectionState::getUserId()
             << " rhost:" << mgmtId );
+        mgmtObject->resourceDestroy();
     }
     broker.getConnectionObservers().closed(*this);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to