Skip to content

Commit

Permalink
asyncio: Fix memory leak caused by hiredis (#2693)
Browse files Browse the repository at this point in the history
  • Loading branch information
oranav committed Apr 4, 2023
1 parent e1017fd commit 5610904
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
1 change: 1 addition & 0 deletions redis/asyncio/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5610904

Please sign in to comment.