diff --git a/kombu/transport/pyamqp.py b/kombu/transport/pyamqp.py index b96837c2..f45e39ed 100644 --- a/kombu/transport/pyamqp.py +++ b/kombu/transport/pyamqp.py @@ -98,7 +98,8 @@ class Transport(base.Transport): return connection.drain_events(**kwargs) def _collect(self, connection): - connection.collect() + if connection is not None: + connection.collect() def establish_connection(self): """Establish connection to the AMQP broker."""