detect and handle task cancellations semi-properly (again)

This commit is contained in:
Connor Olding 2021-08-13 02:28:41 -07:00
parent 3ca869ccad
commit 12d0b4b738

View file

@ -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: