mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
url.c: Remove superfluous for loop
The reason for this loop's existence was removed in commit
02fbc26d59
.
This commit is contained in:
parent
c9d8c00a41
commit
1ea05be46d
32
lib/url.c
32
lib/url.c
@ -5559,25 +5559,19 @@ CURLcode Curl_setup_conn(struct connectdata *conn,
|
||||
is later set again for the progress meter purpose */
|
||||
conn->now = Curl_tvnow();
|
||||
|
||||
for(;;) {
|
||||
/* loop for CURL_SERVER_CLOSED_CONNECTION */
|
||||
|
||||
if(CURL_SOCKET_BAD == conn->sock[FIRSTSOCKET]) {
|
||||
conn->bits.tcpconnect[FIRSTSOCKET] = FALSE;
|
||||
result = Curl_connecthost(conn, conn->dns_entry);
|
||||
if(CURLE_OK != result)
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
Curl_pgrsTime(data, TIMER_CONNECT); /* we're connected already */
|
||||
Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */
|
||||
conn->bits.tcpconnect[FIRSTSOCKET] = TRUE;
|
||||
*protocol_done = TRUE;
|
||||
Curl_updateconninfo(conn, conn->sock[FIRSTSOCKET]);
|
||||
Curl_verboseconnect(conn);
|
||||
}
|
||||
/* Stop the loop now */
|
||||
break;
|
||||
if(CURL_SOCKET_BAD == conn->sock[FIRSTSOCKET]) {
|
||||
conn->bits.tcpconnect[FIRSTSOCKET] = FALSE;
|
||||
result = Curl_connecthost(conn, conn->dns_entry);
|
||||
if(CURLE_OK != result)
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
Curl_pgrsTime(data, TIMER_CONNECT); /* we're connected already */
|
||||
Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */
|
||||
conn->bits.tcpconnect[FIRSTSOCKET] = TRUE;
|
||||
*protocol_done = TRUE;
|
||||
Curl_updateconninfo(conn, conn->sock[FIRSTSOCKET]);
|
||||
Curl_verboseconnect(conn);
|
||||
}
|
||||
|
||||
conn->now = Curl_tvnow(); /* time this *after* the connect is done, we
|
||||
|
Loading…
Reference in New Issue
Block a user