diff --git a/respodns/dns.py b/respodns/dns.py index 38db406..e9cc2ef 100644 --- a/respodns/dns.py +++ b/respodns/dns.py @@ -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: