-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Random delay when trying the next IP after a connect timeout #11920
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
Comments
The delay does not seem to be random. It appears to be the timeout time/2, which in this case is 500ms. When I try the same command line but change the connect time-out to 2 seconds, it seems the delay is about 1000ms. |
What I meant is that the issue is random, I either get the time/2, or 0. |
... so that it gets called again immediately and can continue trying addresses to connect to. Otherwise it might unnecessarily wait for a while there. Fixes #11920 Reported-by: Loïc Yhuel
It seems that when it works properly, it's due to another issue, sometimes
So |
Yes, that could be an optimization. I have just never bothered about it... |
... so that it gets called again immediately and can continue trying addresses to connect to. Otherwise it might unnecessarily wait for a while there. Fixes #11920 Reported-by: Loïc Yhuel
I did this
I tested the connect timeout handling, by connecting to 2 non-responding IPs :
I expected the following
There should be no delay between
[HAPPY-EYEBALLS] ipv4 trying next
andTrying
/cf_socket_open
.Sometimes it works correctly, but sometimes it seems to sleep for the connect timeout delay before opening the socket (then it timeouts immediately).
curl/libcurl version
Issue seen with 8.3.0 and on master.
operating system
Linux (Fedora 38, kernel 6.4.15), but also seen on kernel 5.4 on an embedded target.
The text was updated successfully, but these errors were encountered: