]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tiny adjustments to set the start-time before the curl_connect() is called to
authorDaniel Stenberg <daniel@haxx.se>
Tue, 25 Jul 2000 12:13:57 +0000 (12:13 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 25 Jul 2000 12:13:57 +0000 (12:13 +0000)
allow the connect function to better deal with timeouts, as was just added
to ftp

lib/url.c

index 5194da011b9d4c82b28dc2ed95e93d7926e4658e..a8fe1ec778a1ffebe37a4f994fc4c89960565330 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1166,13 +1166,16 @@ CURLcode curl_connect(CURL *curl, CURLconnect **in_connect)
   }
 
   if(conn->curl_connect) {
-    /* is there a post-connect() procedure? */
+    /* is there a connect() procedure? */
+    conn->now = tvnow(); /* set this here for timeout purposes in the
+                            connect procedure, it is later set again for the
+                            progress meter purpose */
     result = conn->curl_connect(conn);
     if(result != CURLE_OK)
       return result; /* pass back errors */
   }
 
-  pgrsTime(data, TIMER_CONNECT);
+  pgrsTime(data, TIMER_CONNECT); /* we're connected */
 
   conn->now = tvnow(); /* time this *after* the connect is done */
   conn->bytecount = 0;