qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1558192 - /qpid/branches/0.26/qpid/cpp/src/qpid/broker/Bridge.cpp
Date Tue, 14 Jan 2014 21:05:01 GMT
Author: aconway
Date: Tue Jan 14 21:05:01 2014
New Revision: 1558192

URL: http://svn.apache.org/r1558192
Log:
QPID-5454: Sporadic core dump in ha_tests.ReplicationTests.test_auto_delete_failover

Due to race condition Bridge::cancel using a deleted Connection object.
If the bridge is being cancelled because it is about to be created on
a new connection, then it should not attempt to send a cancel to the
remote peer since that connection is no longer valid.

>From trunk r1556966.

Modified:
    qpid/branches/0.26/qpid/cpp/src/qpid/broker/Bridge.cpp

Modified: qpid/branches/0.26/qpid/cpp/src/qpid/broker/Bridge.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/0.26/qpid/cpp/src/qpid/broker/Bridge.cpp?rev=1558192&r1=1558191&r2=1558192&view=diff
==============================================================================
--- qpid/branches/0.26/qpid/cpp/src/qpid/broker/Bridge.cpp (original)
+++ qpid/branches/0.26/qpid/cpp/src/qpid/broker/Bridge.cpp Tue Jan 14 21:05:01 2014
@@ -200,9 +200,10 @@ void Bridge::create(amqp_0_10::Connectio
     if (args.i_srcIsLocal) sessionHandler.getSession()->enableReceiverTracking();
 }
 
-void Bridge::cancel(amqp_0_10::Connection&)
+void Bridge::cancel(amqp_0_10::Connection& c)
 {
-    if (resetProxy()) {
+    // If &c != conn then we have failed over so the old connection is closed.
+    if (&c == conn && resetProxy()) {
         peer->getMessage().cancel(args.i_dest);
         peer->getSession().detach(sessionName);
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message