cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl: Transfer() timeout bug?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 27 Oct 2001 18:31:25 +0200 (MET DST)

On Sat, 27 Oct 2001, Pawel A. Gajda wrote:

(reply CC'ed to the libcurl list for knowledge)

> I think I found a bug in Transfer(), there is a cond in main loop:
>
> if (data->set.timeout && (Curl_tvdiff (now, start) > data->set.timeout))
> failf (data, "Operation timed out with %d out of %d bytes"...)
>
> while "start" is set up once outside the loop; so if I set timeout to 2
> minutes and file is transfered longer than 2 minutes cURL reports
> timeout. I think that "start = Curl_tvnow()" should be placed inside the
> loop, before the select() call.

But... that's the intended functionality! That is the timeout option, it
prevents any transfer to take any longer time than specified!

Or what am I not understanding here?

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-10-27