summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/DirectExchange.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2011-08-10 17:07:21 +0000
committerGordon Sim <gsim@apache.org>2011-08-10 17:07:21 +0000
commit6f8bd706eb058d72a2d66128ac5ed7b2568143ee (patch)
treedc703b0d7e067fabf5260b2048bacf83a7531b4e /cpp/src/qpid/broker/DirectExchange.cpp
parent12bebb1ea87921a08ad70edee2be21cd251bd82f (diff)
downloadqpid-python-6f8bd706eb058d72a2d66128ac5ed7b2568143ee.tar.gz
QPID-3403: Remove empty binding list from map
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1156266 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/DirectExchange.cpp')
-rw-r--r--cpp/src/qpid/broker/DirectExchange.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpp/src/qpid/broker/DirectExchange.cpp b/cpp/src/qpid/broker/DirectExchange.cpp
index 060f80f60d..5591539853 100644
--- a/cpp/src/qpid/broker/DirectExchange.cpp
+++ b/cpp/src/qpid/broker/DirectExchange.cpp
@@ -139,6 +139,9 @@ bool DirectExchange::unbind(Queue::shared_ptr queue, const string& routingKey, c
if (mgmtExchange != 0) {
mgmtExchange->dec_bindingCount();
}
+ if (bk.queues.empty()) {
+ bindings.erase(routingKey);
+ }
} else {
return false;
}