summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/broker/Bridge.cpp5
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);
}