def _close_callback(self):
        while True:
            try:
                callback = self.__callback_queue.popleft()
                callback(ConnectionError("closed connection"))
            except IndexError:
                break
        if self.subscribed:
            # pubsub clients
            self._reply_list.append(ConnectionError("closed connection"))
            self._condition.notify_all()
Callback called when redis closed the connection.
dataset/ETHPy150Open thefab/tornadis/tornadis/client.py/Client._close_callback