Fix infinite loop bug
Resolve #425
To be honest, I don't understand why do we need while loop there? Anyway it will cause infinite loop if gettaddrinfo return ipv6 address while host doesn't have ipv6 interface
Just as clueless, but perhaps it was intended for the for-loop (maybe it was even there before the while-loop was added)
Thanks for the PR and comments!
The first commit was actually pretty clear:
https://github.com/MagicStack/uvloop/commit/2c61d5d3831676a04a33b117e77b782491cd6765#diff-a7cf5c98d355cbec45134d87daf36ebe5dea13c052e6098ca5331fedebfd6b8cR704-R712
So I think we should do:
addrinfo = addrinfo.ai_next
continue
rather than a single continue or break. I haven't verified or tested though.
Yep, this work well