diff options
Diffstat (limited to 'cpp/src/qpid/broker/BrokerChannel.cpp')
-rw-r--r-- | cpp/src/qpid/broker/BrokerChannel.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/BrokerChannel.cpp b/cpp/src/qpid/broker/BrokerChannel.cpp index 26e590f87e..f6a50a7ef5 100644 --- a/cpp/src/qpid/broker/BrokerChannel.cpp +++ b/cpp/src/qpid/broker/BrokerChannel.cpp @@ -249,8 +249,13 @@ Channel::ConsumerImpl::~ConsumerImpl() { } void Channel::ConsumerImpl::cancel(){ - if(queue) + if(queue) { queue->cancel(this); + if (queue->canAutoDelete()) { + parent->connection.broker.getQueues().destroyIf(queue->getName(), + boost::bind(boost::mem_fn(&Queue::canAutoDelete), queue)); + } + } } void Channel::ConsumerImpl::requestDispatch(){ |