On linux if this is not the first connect() call for a udp socket, connect(AF_UNSPEC) first#20
On linux if this is not the first connect() call for a udp socket, connect(AF_UNSPEC) first#20daurnimator wants to merge 2 commits intowahern:masterfrom
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