Fix step could complete all at once

This commit is contained in:
Lonami Exo 2023-09-17 22:53:52 +02:00
parent 2541c409e2
commit 5f4470dd57

View File

@ -144,9 +144,10 @@ class Sender:
return_when=FIRST_COMPLETED,
)
for task in pending:
task.cancel()
await asyncio.wait(pending)
if pending:
for task in pending:
task.cancel()
await asyncio.wait(pending)
result = []
if recv_req in done: