summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2012-11-29 13:12:39 +0000
committerAsk Solem <ask@celeryproject.org>2012-11-29 13:12:39 +0000
commit5990f4f3554d6843c135669a500cff34802c8a93 (patch)
tree7a0e36ce67e4cbc976d68545c86ba16230f9fa72
parent3887ac02d5c6d954b7805618fa1550e00f4eea74 (diff)
downloadpy-amqp-5990f4f3554d6843c135669a500cff34802c8a93.tar.gz
Don't attempt to close channel if no connection. Fixes celery/celery#1095
-rw-r--r--amqp/channel.py2
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()