gera2ld / async_dns

DNS library based on asyncio
MIT License
70 stars 17 forks source link

Immediate asyncio.exceptions.CancelledError #30

Closed powellnorma closed 1 year ago

powellnorma commented 1 year ago

Any ideas why this would occur? I can use dig NS myDomain.tld without problems

dbg1: resolver.query <myDomain.tld> 2 12:18:45.950923
dbg1: resolver.query got CancelledError() at 12:18:45.951161
Traceback (most recent call last):
  File "/app.py", line 465, in lookup_dns
    res, cached = await resolver.query(dom, get_type())
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv3.11/lib64/python3.11/site-packages/async_dns/resolver/base_resolver.py", line 64, in query
    return await asyncio.wait_for(self._query(fqdn, qtype),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/tasks.py", line 466, in wait_for
    await waiter
asyncio.exceptions.CancelledError
powellnorma commented 1 year ago

Ok I suspect the cancellation comes from internal logic