curl-library
Re: AllowServerConnect timing
Date: Sun, 22 Apr 2007 09:48:29 +0200 (CEST)
On Sun, 22 Apr 2007, Yang Tse wrote:
> There is also a small amount that is subtracted from the timeout called
> 'timespent'. This will be a value near zero as it is calculated in two
> consecutive lines as;
>
> struct timeval now = Curl_tvnow();
> long timespent = Curl_tvdiff(Curl_tvnow(), now);
Whoa, how silly! ;-)
I can't see how 'now' can be right, I think it should rather be conn->now so
that the timeout options work properly from the start of the operation.
If there's no timeout option set, we default to the "60 seconds from this
moment" which then needs to be based on the current time and not conn->now,
and I can't see how we can do that without asking for the current time. Basing
it on 'conn->proto.ftpc->response' time is bad for the cases where there is a
significant round-trip time to the server.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-04-22