From e54a449165479b4396ae76b9249d6d035243053c Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Mon, 15 Nov 2010 12:38:33 +0100 Subject: [PATCH] Redis: Disconnect on channel close. --- kombu/transport/pyredis.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kombu/transport/pyredis.py b/kombu/transport/pyredis.py index cbf269e8..71b38712 100644 --- a/kombu/transport/pyredis.py +++ b/kombu/transport/pyredis.py @@ -176,11 +176,13 @@ class Channel(virtual.Channel): def close(self): self._poller.close() - super(Channel, self).close() try: self.client.bgsave() + self.client.connection.disconnect() except self.ResponseError: pass + super(Channel, self).close() + def _open(self): conninfo = self.connection.client