summaryrefslogtreecommitdiff
path: root/kombu/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'kombu/common.py')
-rw-r--r--kombu/common.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/kombu/common.py b/kombu/common.py
index 30abe1c6..8c2c847d 100644
--- a/kombu/common.py
+++ b/kombu/common.py
@@ -168,6 +168,10 @@ def _maybe_declare(entity, channel):
def _imaybe_declare(entity, channel, **retry_policy):
_ensure_channel_is_bound(entity, channel)
+
+ if not channel.connection:
+ raise RecoverableConnectionError('channel disconnected')
+
return entity.channel.connection.client.ensure(
entity, _maybe_declare, **retry_policy)(entity, channel)