Skip to content

Commit 6cdb401

Browse files
committed
-
1 parent 76582a5 commit 6cdb401

File tree

2 files changed

+330
-330
lines changed

2 files changed

+330
-330
lines changed

src/zmq_anyio/_socket.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -901,19 +901,19 @@ async def _start(self, *, task_status: TaskStatus[None] = TASK_STATUS_IGNORED):
901901
self._task_group,
902902
exception_handler=ignore_exceptions,
903903
)
904-
wait_readable_task = create_task(
905-
wait_readable(self), # type: ignore[arg-type]
906-
self._task_group,
907-
exception_handler=ignore_exceptions,
908-
)
909904
tasks = [
910-
wait_readable_task,
905+
create_task(
906+
wait_readable(self), # type: ignore[arg-type]
907+
self._task_group,
908+
exception_handler=ignore_exceptions,
909+
),
911910
wait_stopped_task,
912911
]
913912
done, pending = await wait(
914913
tasks, self._task_group, return_when=FIRST_COMPLETED
915914
)
916-
wait_stopped_task.cancel()
915+
for task in pending:
916+
task.cancel()
917917
if wait_stopped_task in done:
918918
break
919919
await self._handle_events()

0 commit comments

Comments
 (0)