Skip to content
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

DNS oversight in asyncio examples #33

Open
sonicisthebest opened this issue Dec 13, 2016 · 1 comment
Open

DNS oversight in asyncio examples #33

sonicisthebest opened this issue Dec 13, 2016 · 1 comment

Comments

@sonicisthebest
Copy link

sonicisthebest commented Dec 13, 2016

Hi. Neat library.

Just testing things out using asyncio and I noticed some blocking code in the asyncio examples. It seems that UdpTransportTarget((host, port)) is calling to resolve DNS in a blocking manor, which causes delay on the asyncio event loop.

Looks like the asyncio version may need a coroutine based DNS resolution. Perhaps using https://docs.python.org/3.5/library/asyncio-eventloop.html#asyncio.AbstractEventLoop.getaddrinfo

@etingof
Copy link
Owner

etingof commented Dec 18, 2016

Indeed! I will fix that eventually. Unless you come up with a PR before. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants