summaryrefslogtreecommitdiff
path: root/kombu/transport
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2013-04-30 13:19:35 +0100
committerAsk Solem <ask@celeryproject.org>2013-04-30 13:19:35 +0100
commitfee11d1ea9733a266a5b845872df13e6166804ac (patch)
tree6e2ef6d48462fee51b2d57d162cdd14fc01d7bc3 /kombu/transport
parentefa14fc7d423ea00f4ec7662a26279a225e33a9b (diff)
parent778143b34b57feec469a26fd0976b49e25a8150f (diff)
downloadkombu-fee11d1ea9733a266a5b845872df13e6166804ac.tar.gz
Merge branch '2.5'
Conflicts: kombu/pidbox.py kombu/utils/__init__.py kombu/utils/eventio.py
Diffstat (limited to 'kombu/transport')
-rw-r--r--kombu/transport/librabbitmq.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/kombu/transport/librabbitmq.py b/kombu/transport/librabbitmq.py
index ee6246c1..4ada8a55 100644
--- a/kombu/transport/librabbitmq.py
+++ b/kombu/transport/librabbitmq.py
@@ -9,6 +9,7 @@ kombu.transport.librabbitmq
"""
from __future__ import absolute_import
+import os
import socket
try:
@@ -119,8 +120,22 @@ class Transport(base.Transport):
def close_connection(self, connection):
"""Close the AMQP broker connection."""
+ self.client.drain_events = None
connection.close()
+ def _collect(self, connection):
+ if connection is not None:
+ for channel in connection.channels.itervalues():
+ channel.connection = None
+ try:
+ os.close(connection.fileno())
+ except OSError:
+ pass
+ connection.channels.clear()
+ connection.callbacks.clear()
+ self.client.drain_events = None
+ self.client = None
+
def verify_connection(self, connection):
return connection.connected