RE: Always get connection timeout
Date: Mon, 18 Aug 2008 10:52:47 -0700
For the benefit of others:
Turns out my problem was related to the following bug logged against
I hacked the configure script so that it would not use "clock_gettime"
and use "gettimeofday" instead and that seems to have cleaned things up
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Price, Robert
Sent: August 15, 2008 3:09 PM
To: libcurl development
Subject: RE: Always get connection timeout
Right...it is used here:
timeout_ms -= Curl_tvdiff(*nowp, data->progress.t_startsingle);
But, my problem is that Curl_tvdiff() is ALWAYS returning the same value
- which doesn't use the timeout value.
Currently, not using a 64-bit architecture (x386) on a 2.40.20 kernel.
I am debugging using gdb, maybe I'll spend some cycles looking to see if
the values in nowp and data->progress.t_startsingle are actually
changing from execution to execution.
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Dan Fandrich
Sent: August 15, 2008 2:52 PM
Subject: Re: Always get connection timeout
On Fri, Aug 15, 2008 at 01:20:28PM -0700, Price, Robert wrote:
> The option for defining the timeout is:
This is wrong; it should be:
You didn't say what architecture you're using, but if it's x86_64, this
will cause you grief (potentially the kind you're seeing).
> How, though, does that affect the calculation for Curl_timeleft()?
Because that value for CURLOPT_CONNECTTIMEOUT is used in
> Because it doesn't even look at that. The initial value for
> = 30000, which is correct. The result I'm getting from
> is ALWAYS 3532134. So, by subtracting that value from my timeout set,
> end up with -3502134 - and it thinks I'm outta time.
> I've tried setting options to forbid reuse and force a fresh connect,
> but that doesn't seem to change anything. I'm beginning to wonder if
> have some problem with Curl_tvnow() or something???
You could see what values are being returned by using gdb or adding some
debug prints in the code to try to narrow the problem.
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2008-08-18