-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify nameservers directly #18
base: master
Are you sure you want to change the base?
Conversation
self.host = host | ||
self.ns = ns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As i understand there is no effect of specifying ns for Provider in the scope of this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this was used in other code not included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still cant figure out how ns affects resolver
@@ -101,7 +103,7 @@ def __init__(self, providers=BASE_PROVIDERS, timeout=5, | |||
asyncio.set_event_loop(self._loop) | |||
else: | |||
self._loop = loop | |||
self._resolver = aiodns.DNSResolver(timeout=timeout, tries=tries, loop=self._loop) | |||
self._resolver = aiodns.DNSResolver(timeout=timeout, tries=tries, loop=self._loop, nameservers=ns) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, but there is questions on the other part of this PR
Radically faster than using a local resolver in most cases.
Note: this should really be set per-provider, but looks like the minimal change is just to pass through to the resolver class.