Skip to content

Commit acef5cc

Browse files
authored
Update src/zmq_anyio/_socket.py
1 parent 5382468 commit acef5cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zmq_anyio/_socket.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,9 +913,9 @@ def fileno() -> int:
913913
try:
914914
await wait_readable(fd)
915915
except ClosedResourceError:
916-
tg.cancel_scope.cancel()
917916
break
918-
tg.cancel_scope.cancel()
917+
finally:
918+
tg.cancel_scope.cancel()
919919
if self.stopped.is_set():
920920
break
921921
await self._handle_events()

0 commit comments

Comments
 (0)