diff options
| author | Alan Conway <aconway@apache.org> | 2014-01-14 21:05:01 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2014-01-14 21:05:01 +0000 |
| commit | d7c0650850404073fa1ab7e2d78c8691be259666 (patch) | |
| tree | f255f0c1451ee91f74ecad3436a16c8b181d9c3c | |
| parent | c2d08814e1aba13402f32debb68a3b851e5ce339 (diff) | |
| download | qpid-python-d7c0650850404073fa1ab7e2d78c8691be259666.tar.gz | |
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.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.26@1558192 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | qpid/cpp/src/qpid/broker/Bridge.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/broker/Bridge.cpp b/qpid/cpp/src/qpid/broker/Bridge.cpp index b7fbb1a9aa..06d3a0dd52 100644 --- a/qpid/cpp/src/qpid/broker/Bridge.cpp +++ b/qpid/cpp/src/qpid/broker/Bridge.cpp @@ -200,9 +200,10 @@ void Bridge::create(amqp_0_10::Connection& c) 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); } |
