aio-libs / aiodns

Simple DNS resolver for asyncio
https://pypi.python.org/pypi/aiodns
MIT License
538 stars 69 forks source link

Retry behavior #99

Closed maelp closed 3 years ago

maelp commented 3 years ago

Hi,

it seems that when doing a query, if the DNS server does not reply, the query will be automatically retried, either by aiodns or by pycares. Do you know if there is a way to set this behavior?

For instance choose the max number of retries?

saghul commented 3 years ago

You should be able to configure that with a kwarg to the resolver init. Check the pycares docs since we accept those options.