-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Websockets - 150 seconds to connect to the endpoint #10157
Comments
I would like to point out that this issue was also present in |
@icing isn't this a bug? In this case, there's a socket filter and an SSL filter added, and when In that function, the state is neither of the two checked for, so it returns blank. This, while the socket is not yet connected. Surely it calls the wrong getsock() here prematurely? |
Since there are filters addded for both socket and SSL, the code previously checked the SSL sockets during connect when it *should* first check the socket layer until that has connected. Fixes #10157
Thank you @bagder for quickly fixing it. |
When there are filters addded for both socket and SSL, the code previously checked the SSL sockets during connect when it *should* first check the socket layer until that has connected. Fixes curl#10157 Fixes curl#10146 Closes curl#10160 Reviewed-by: Stefan Eissing
I did this
I am using the
multi_socket
interface withlibev
to connect to a WebSocket endpoint. I have observed an intermittent bug where curl gets stuckCURLMstate::MSTATE_CONNECTING
stage for around 150 seconds because the underlying socket wasn't writable(is_connected
done
out parameter isfalse
) when curl checked. And, nearest timeout set is forEXPIRE_DNS_PER_NAME
which defaults to 200 seconds. But, every single time, eventually, curl connects to the endpoint.I expected the following
I'd expect curl to routinely check the underlying socket until it becomes writable.
This might help in reproducing the bug
wss://fstream.binance.com/stream?streams=btcusdt@depth5
CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
to100
(ms) (Not sure how this is related.)curl/libcurl version
operating system
The text was updated successfully, but these errors were encountered: