aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjst@bjorn>2013-11-05 23:57:22 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-11-05 23:15:33 +0000
commit1ea05be46d5901e449a79f95f9df31ff67c43fe1 (patch)
tree6d6380d6a33e467b1904e5a7a2abd6c6590407f9 /lib/url.c
parentc9d8c00a41e093ff7f42c9cf4a0ceba5091ecf0d (diff)
url.c: Remove superfluous for loop
The reason for this loop's existence was removed in commit 02fbc26d59c591.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/lib/url.c b/lib/url.c
index b069375a7..9526cdcc1 100644
--- a/lib/url.c
+++ b/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