diff --git a/brukva/client.py b/brukva/client.py index 45bcd9a..0917265 100644 --- a/brukva/client.py +++ b/brukva/client.py @@ -304,10 +304,11 @@ def __getattr__(self, item): class Client(object): def __init__(self, host='localhost', port=6379, password=None, - selected_db=None, io_loop=None): + selected_db=None, io_loop=None, connect_timeout=None): self._io_loop = io_loop or IOLoop.instance() self.connection = Connection(host, port, - self.on_connect, self.on_disconnect, io_loop=self._io_loop) + self.on_connect, self.on_disconnect, timeout=connect_timeout, + io_loop=self._io_loop) self.async = _AsyncWrapper(weakref.proxy(self)) self.queue = [] self.current_cmd_line = None @@ -889,7 +890,7 @@ def unsubscribe(self, channels, callbacks=None): self._unsubscribe('UNSUBSCRIBE', channels, callbacks) def punsubscribe(self, channels, callbacks=None): - self._unsubscribe('UNSUBSCRIBE', channels, callbacks) + self._unsubscribe('PUNSUBSCRIBE', channels, callbacks) def _unsubscribe(self, cmd, channels, callbacks=None): callbacks = callbacks or []