summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oslo_messaging/_drivers/impl_rabbit.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py
index 1d77cfd..4ad763e 100644
--- a/oslo_messaging/_drivers/impl_rabbit.py
+++ b/oslo_messaging/_drivers/impl_rabbit.py
@@ -34,6 +34,7 @@ from oslo_config import cfg
34from oslo_log import log as logging 34from oslo_log import log as logging
35from oslo_utils import eventletutils 35from oslo_utils import eventletutils
36import six 36import six
37import six.moves
37from six.moves.urllib import parse 38from six.moves.urllib import parse
38 39
39import oslo_messaging 40import oslo_messaging
@@ -786,11 +787,11 @@ class Connection(object):
786 """Close/release this connection.""" 787 """Close/release this connection."""
787 self._heartbeat_stop() 788 self._heartbeat_stop()
788 if self.connection: 789 if self.connection:
789 for consumer, tag in self._consumers.items(): 790 for consumer in six.moves.filter(lambda c: c.type == 'fanout',
790 if consumer.type == 'fanout': 791 self._consumers):
791 LOG.debug('[connection close] Deleting fanout ' 792 LOG.debug('[connection close] Deleting fanout '
792 'queue: %s ' % consumer.queue.name) 793 'queue: %s ' % consumer.queue.name)
793 consumer.queue.delete() 794 consumer.queue.delete()
794 self._set_current_channel(None) 795 self._set_current_channel(None)
795 self.connection.release() 796 self.connection.release()
796 self.connection = None 797 self.connection = None