detect and handle task cancellations semi-properly (again)
This commit is contained in:
parent
3ca869ccad
commit
12d0b4b738
1 changed files with 3 additions and 1 deletions
|
@ -173,8 +173,10 @@ async def try_ip(db, server_ip, checks, context, opts: Options, callback=None):
|
|||
task = create_task(process(check))
|
||||
tasks.append(task)
|
||||
for task in tasks:
|
||||
if not task.cancelled():
|
||||
try:
|
||||
await task
|
||||
except CancelledError:
|
||||
pass
|
||||
|
||||
if not opts.dry:
|
||||
for entry in entries:
|
||||
|
|
Loading…
Reference in a new issue