diff options
author | Ask Solem <ask@celeryproject.org> | 2012-11-29 13:12:39 +0000 |
---|---|---|
committer | Ask Solem <ask@celeryproject.org> | 2012-11-29 13:12:39 +0000 |
commit | 5990f4f3554d6843c135669a500cff34802c8a93 (patch) | |
tree | 7a0e36ce67e4cbc976d68545c86ba16230f9fa72 | |
parent | 3887ac02d5c6d954b7805618fa1550e00f4eea74 (diff) | |
download | py-amqp-5990f4f3554d6843c135669a500cff34802c8a93.tar.gz |
Don't attempt to close channel if no connection. Fixes celery/celery#1095
-rw-r--r-- | amqp/channel.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/amqp/channel.py b/amqp/channel.py index 3d55e96..f1bb7f5 100644 --- a/amqp/channel.py +++ b/amqp/channel.py @@ -146,7 +146,7 @@ class Channel(AbstractChannel): """ try: - if not self.is_open: + if not self.is_open or self.connection is None: return args = AMQPWriter() |