mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
cf-socket: if socket is already connected, return CURLE_OK
In 7.87.0, if callback method for CURLOPT_SOCKOPTFUNCTION returns CURL_SOCKOPT_ALREADY_CONNECTED then curl library used to return CURLE_OK. n 7.88.0, now even if callback returns CURL_SOCKOPT_ALREADY_CONNECTED, curl library still tries to connect to socket by invoking method do_connect(). This is regression caused by commit https://github.com/curl/curl/commit/71b7e0161032927cdfb Fix: Check if we are already connected and return CURLE_OK. Fixes #10626 Closes #10648
This commit is contained in:
parent
d36c632c86
commit
233810bb5f
@ -1071,6 +1071,11 @@ static CURLcode cf_tcp_connect(struct Curl_cfilter *cf,
|
||||
if(result)
|
||||
goto out;
|
||||
|
||||
if(cf->connected) {
|
||||
*done = TRUE;
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
/* Connect TCP socket */
|
||||
rc = do_connect(cf, data, cf->conn->bits.tcp_fastopen);
|
||||
if(-1 == rc) {
|
||||
|
Loading…
Reference in New Issue
Block a user