Skip to content

Commit

Permalink
always clear reference to closed reader/writer (#2077)
Browse files Browse the repository at this point in the history
* always clear reference to reader/writer

* add #2065 to changes
  • Loading branch information
beasteers authored Apr 4, 2022
1 parent 51a4dd9 commit ff93817
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Fix cursor returned by SCAN for RedisCluster & change default target to PRIMARIES
* Fix scan_iter for RedisCluster
* Remove verbose logging when initializing ClusterPubSub, ClusterPipeline or RedisCluster
* Fix broken connection writer lock-up for asyncio (#2065)

* 4.1.3 (Feb 8, 2022)
* Fix flushdb and flushall (#1926)
Expand Down
5 changes: 3 additions & 2 deletions redis/asyncio/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,9 @@ async def disconnect(self):
await self._writer.wait_closed() # type: ignore[union-attr]
except OSError:
pass
self._reader = None
self._writer = None
finally:
self._reader = None
self._writer = None
except asyncio.TimeoutError:
raise TimeoutError(
f"Timed out closing connection after {self.socket_connect_timeout}"
Expand Down

0 comments on commit ff93817

Please sign in to comment.