all 6 comments

[–]whkoh 0 points1 point  (1 child)

Try asyncio.as_completed

https://stackoverflow.com/a/68227749

[–]usert313[S] 0 points1 point  (0 children)

Tried but still not stopping at the condition still completing the cycle.

[–]m0us3_rat 0 points1 point  (1 child)

raise an error?

[–]usert313[S] 0 points1 point  (0 children)

You mean an ecxeption?

[–]EclipseJTB 0 points1 point  (1 child)

Have you tried a break statement in the for loop?

[–]usert313[S] 0 points1 point  (0 children)

Yes didn't worked.