From b2bcbc8bf1ae5622567acbc20e30e9c2e977e5c0 Mon Sep 17 00:00:00 2001 From: dvora-h <67596500+dvora-h@users.noreply.github.com> Date: Thu, 21 Jul 2022 15:17:14 +0300 Subject: [PATCH] fix is_connected (#2278) --- redis/asyncio/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/asyncio/connection.py b/redis/asyncio/connection.py index 5bf2a0fd74..a528abce04 100644 --- a/redis/asyncio/connection.py +++ b/redis/asyncio/connection.py @@ -687,7 +687,7 @@ def __del__(self): @property def is_connected(self): - return self._reader and self._writer + return self._reader is not None and self._writer is not None def register_connect_callback(self, callback): self._connect_callbacks.append(weakref.WeakMethod(callback))