cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] timeout in ms

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 30 Jan 2007 12:44:52 +0100 (CET)

On Tue, 30 Jan 2007, Michael Wallner wrote:

> attached is a patch against current CVS, which is supposed to add timeout
> support in milliseconds (CURLOPT_TIMEOUT_MS, CURLOPT_CONNECTTIMEOUT_MS).

Nice!

Now this may seem silly, but does anyone think it would be worth to check/bail
out if you try setting a timeout that will overflow the long holding
milliseconds? On 32 bit systems with a signed variable holding the value, the
max is 2147483648 ms which equals 24.86 days.

We didn't deal with this very nicely before either, since we multiply the
timeout with 1000 in several places in the code, assuming that it will fit.

I vote we just document that a timeout longer than 2147483 seconds won't work.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-01-30