-
Notifications
You must be signed in to change notification settings - Fork 31
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
Does not work on Windows #5
Comments
* If multiple IPs are resolved from a hostname, randomly choose one of those IPs instead of hardcoding it to use the third one.
@asantoni thanks for the noticing that and for the PR, I hope will have time to review it and update the library by the end of the week (have a huge workload currently) |
is this still an issue? |
Yes, looks like only one new (unrelated) commit in master since I opened this. If you need it working on Windows right now, feel free to use my fork temporarily. (asantoni/aioping) |
Fix issue #5: Does not work on Windows
Sorry for delay guys, just merged the request, will update the distro now. @asantoni thanks a lot for the fix! |
confirmed working/fixed. Thanks for the merge! great library btw. |
* If multiple IPs are resolved from a hostname, randomly choose one of those IPs instead of hardcoding it to use the third one.
Fix issue stellarbit#5: Does not work on Windows
aioping does not work correctly on Windows 10 because this code around line 230 of
__init__.py
blows up:You get an exception because
info
is only of length 1 on Windows.This code looks sketchy to me (why choose the third
info
element?), so I hacked it to just pick a random element and I'll send a PR shortly. My understand is that this is doing a DNS lookup, and if there's multiple records returned, we should picking a random one. The code should probably be extended to handle IPv6 more explicitly too, but I'll leave that as an exercise for someone else!The text was updated successfully, but these errors were encountered: