Redis: Disconnect on channel close.

This commit is contained in:
Ask Solem 2010-11-15 12:38:33 +01:00
parent 76300d0536
commit e54a449165
1 changed files with 3 additions and 1 deletions

View File

@ -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