diff options
author | Ted Ross <tross@apache.org> | 2009-09-03 17:20:45 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2009-09-03 17:20:45 +0000 |
commit | 9018310f6a81187828c6ce96793469baf35cf6fc (patch) | |
tree | 2eb59c907ab19eb20e653a8cf31897d71e3e2c3c /qpid/cpp | |
parent | af7819a34761c5d983521fc879384feb6c9cfe6e (diff) | |
download | qpid-python-9018310f6a81187828c6ce96793469baf35cf6fc.tar.gz |
QPID-2045 - crash when destroying a federation link with a dynamic bridge
Committed patch from Ken Guisti
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@811046 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r-- | qpid/cpp/src/qpid/broker/Link.cpp | 4 | ||||
-rwxr-xr-x | qpid/cpp/src/tests/federation.py | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/broker/Link.cpp b/qpid/cpp/src/qpid/broker/Link.cpp index 9a845b0339..cdba18ccf9 100644 --- a/qpid/cpp/src/qpid/broker/Link.cpp +++ b/qpid/cpp/src/qpid/broker/Link.cpp @@ -200,8 +200,10 @@ void Link::destroy () // Move the bridges to be deleted into a local vector so there is no // corruption of the iterator caused by bridge deletion. - for (Bridges::iterator i = active.begin(); i != active.end(); i++) + for (Bridges::iterator i = active.begin(); i != active.end(); i++) { + (*i)->closed(); toDelete.push_back(*i); + } active.clear(); for (Bridges::iterator i = created.begin(); i != created.end(); i++) diff --git a/qpid/cpp/src/tests/federation.py b/qpid/cpp/src/tests/federation.py index 1175074093..aa68e8198b 100755 --- a/qpid/cpp/src/tests/federation.py +++ b/qpid/cpp/src/tests/federation.py @@ -573,8 +573,13 @@ class FederationTests(TestBase010): result = bridge.close() self.assertEqual(result.status, 0) - result = bridge2.close() - self.assertEqual(result.status, 0) + + # Extra test: don't explicitly close() bridge2. When the link is closed, + # it should clean up bridge2 automagically. verify_cleanup() will detect + # if bridge2 isn't cleaned up and will fail the test. + # + #result = bridge2.close() + #self.assertEqual(result.status, 0) result = link.close() self.assertEqual(result.status, 0) |