-
Notifications
You must be signed in to change notification settings - Fork 64
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
On linux if this is not the first connect() call for a udp socket, connect(AF_UNSPEC) first #20
base: master
Are you sure you want to change the base?
Conversation
…nnect(AF_UNSPEC) first
e9d2475
to
7529e2b
Compare
Actually this might not be the total fix. The 'resolve' interface doesn't move on in the case of the ECONNREFUSED:
|
With that change the behaviour becomes the IMO more sensible:
|
Eek, that wasn't the result I thought it was: the second time around |
Oops, I jumped to that conclusion too fast: my code didn't iterate the nameserver and hence it just tried the same one again. strace excerpt showing that AF_UNSPEC does work:
|
c6f6bbe
to
d7f7032
Compare
I've updated this PR with fixed code. strace output:
|
This fix matches the description at https://man7.org/linux/man-pages/man2/connect.2.html
By connecting using |
Related to #19