diff --git a/CHANGES b/CHANGES index b0744c6038..429045f9a5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,4 @@ + * asyncio: Fix memory leak caused by hiredis (#2693) * Allow data to drain from async PythonParser when reading during a disconnect() * Use asyncio.timeout() instead of async_timeout.timeout() for python >= 3.11 (#2602) * Add test and fix async HiredisParser when reading during a disconnect() (#2349) diff --git a/redis/asyncio/connection.py b/redis/asyncio/connection.py index 58dcd66efb..03c11a840e 100644 --- a/redis/asyncio/connection.py +++ b/redis/asyncio/connection.py @@ -378,6 +378,7 @@ def on_connect(self, connection: "Connection"): def on_disconnect(self): self._connected = False + self._reader = None async def can_read_destructive(self): if not self._connected: