mirror of
https://github.com/curl/curl.git
synced 2026-07-26 11:27:16 +03:00
url.c: fix endless loop upon transport connection timeout
Jerry Wu detected and provided detailed info about this issue.
This commit is contained in:
parent
fd10c047df
commit
1bab38780b
1 changed files with 7 additions and 1 deletions
|
|
@ -5073,7 +5073,7 @@ static CURLcode create_conn(struct SessionHandle *data,
|
|||
CURLcode Curl_setup_conn(struct connectdata *conn,
|
||||
bool *protocol_done)
|
||||
{
|
||||
CURLcode result=CURLE_OK;
|
||||
CURLcode result = CURLE_OK;
|
||||
struct SessionHandle *data = conn->data;
|
||||
|
||||
Curl_pgrsTime(data, TIMER_NAMELOOKUP);
|
||||
|
|
@ -5119,6 +5119,12 @@ CURLcode Curl_setup_conn(struct connectdata *conn,
|
|||
|
||||
result = ConnectPlease(data, conn, &connected);
|
||||
|
||||
if(result && !conn->ip_addr) {
|
||||
/* transport connection failure not related with authentication */
|
||||
conn->bits.tcpconnect[FIRSTSOCKET] = FALSE;
|
||||
return result;
|
||||
}
|
||||
|
||||
if(connected) {
|
||||
result = Curl_protocol_connect(conn, protocol_done);
|
||||
if(CURLE_OK == result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue