Skip to content

Commit

Permalink
fix is_connected (#2278)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvora-h committed Jul 21, 2022
1 parent 6a78773 commit b2bcbc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis/asyncio/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit b2bcbc8

Please sign in to comment.