Skip to content

Commit

Permalink
Reraise CancelledError in connect() (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwestcott authored Oct 19, 2020
1 parent 734ce29 commit 642480d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aredis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ async def can_read(self):
async def connect(self):
try:
await self._connect()
except aredis.compat.CancelledError:
raise
except Exception as exc:
raise ConnectionError()
# run any user callbacks. right now the only internal callback
Expand Down

0 comments on commit 642480d

Please sign in to comment.