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
Subsequent calls to DNS Client query fails #26
Comments
It seems that async_dns shares the same protocol for all clients, so it runs into trouble when the dispatcher which holds the protocol is created with an event loop and the new client is created with another. async_dns/async_dns/request/udp.py Lines 64 to 65 in fe2ff8c
In your case, simply adding a from async_dns.request.udp import Dispatcher
# ...
def tearDown(self):
Dispatcher.data.clear() I guess the dispatcher / protocol should not be destroyed after each request internally. So maybe I should add this to |
Looks like the |
Normally this should not happen because we don't force clear cache this way. Anyway I will close the socket in |
In the latest alpha from async_dns.request import clean
# ...
def tearDown(self):
clean() |
Subsequent calls to
DnsClient
fails . Both tests pass independently, but when I run the whole suite the second one timeouts. The following code was used to reproduce the issue using the latest alpha==2.0.0a2
. Python version is3.9.5
Unclear to me why this happens, but I noticed the
CallbackProtocol
does not implement the methodserror_received
andconnection_lost
exposed at the example on python docs. Can this behaviour be related to UDP socket handling, maybe some disposal routines or anything like that?The text was updated successfully, but these errors were encountered: