cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: No connect time with 7.20.1 and multi interface

From: Dirk Manske <dm_at_nonitor.de>
Date: Sun, 2 May 2010 20:11:40 +0200

Hi Daniel.

On Friday 30 April 2010 22:45:08 Daniel Stenberg wrote:
> On Fri, 30 Apr 2010, Dirk Manske wrote:
> > in curl 7.20.1 (and also latested version from git) we don't have a
> > connect time with the multi interface. In 7.20.0 there was a connect
> > time.
>
> Does it never?
Yes.

> It would be great so that we can add a test case for this to go with the
> fix, to make sure we won't repeat this mistake in the future!

I've added the check to lib502.c, but that test is configured to use file
and not a network protocol, so i've copied it to lib573.c, if you
run s.t. like this
./lib573 http://curl.haxx.se/ >/dev/null
than you will find "connect time is 0" in stderr

-- lib502.c 2010-05-01 12:28:23.741310130 +0000
+++ lib573.c 2010-05-01 12:24:54.461310480 +0000
@@ -25,6 +25,7 @@
   CURLM *m = NULL;
   int res = 0;
   int running=1;
+ long connect_time = 0;
   struct timeval mp_start;
   char mp_timedout = FALSE;
 
@@ -80,6 +81,12 @@
     res = TEST_ERR_RUNS_FOREVER;
   }
 
+ curl_easy_getinfo(c, CURLINFO_CONNECT_TIME, &connect_time);
+ if (connect_time==0) {
+ fprintf(stderr, "connect time is 0\n");
+ res = TEST_ERR_MAJOR_BAD;
+ }
+
 test_cleanup:
 
   if(m) {

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-02