def disconnect(self):
        "Disconnects from the Redis server"
        self._parser.on_disconnect()
        try:
            self._writer.close()
        except Exception:
            pass
        self._reader = None
        self._writer = None