qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r959752 - in /qpid/trunk/qpid/cpp/src/qpid/cluster: Connection.cpp ConnectionCodec.cpp
Date Thu, 01 Jul 2010 19:23:43 GMT
Author: aconway
Date: Thu Jul  1 19:23:43 2010
New Revision: 959752

URL: http://svn.apache.org/viewvc?rev=959752&view=rev
Log:
Fix sporadic cluster core on exit.

Fix a race condition that allows a cluster::Connection to be deleted via the Cluster's
local map before it was fully initialized.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp
    qpid/trunk/qpid/cpp/src/qpid/cluster/ConnectionCodec.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=959752&r1=959751&r2=959752&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp Thu Jul  1 19:23:43 2010
@@ -95,7 +95,6 @@ Connection::Connection(Cluster& c, sys::
     updateIn(c.getUpdateReceiver()),
     secureConnection(0)
 {
-    cluster.addLocalConnection(this);
     if (isLocalClient()) {
         giveReadCredit(cluster.getSettings().readMax); // Flow control
         // Delay adding the connection to the management map until announce()

Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/ConnectionCodec.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/ConnectionCodec.cpp?rev=959752&r1=959751&r2=959752&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/ConnectionCodec.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/ConnectionCodec.cpp Thu Jul  1 19:23:43 2010
@@ -58,6 +58,7 @@ ConnectionCodec::ConnectionCodec(
 ) : codec(out, logId, isLink),
     interceptor(new Connection(cluster, codec, logId, cluster.getId(), catchUp, isLink, external))
 {
+    cluster.addLocalConnection(interceptor);
     std::auto_ptr<sys::ConnectionInputHandler> ih(new ProxyInputHandler(interceptor));
     codec.setInputHandler(ih);
     codec.setVersion(v);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message