cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: timeouts

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 25 Oct 2000 12:34:24 +0200 (MET DST)

On Wed, 25 Oct 2000, Georg Horn wrote:

> > So, you basically like to extend the default timeout time, right?
>
> No, i wanted to shorten it to for example 30 seconds or so. I thought if
> it doesn't answer within 30 secs, it'll never answer. Testing against a
> server that is blocked at the firewall, connect() hangs for about 13
> minutes on my linux machine.

This could probably be done by doing a separate thread that supervises the
main curl thread. Ignore the alarm() crap, and instead you fork() off the
curl-stuff in a separate process that if it isn't complete with X seconds,
you kill it from the main process.

Would be pretty straight forward in perl as well.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2000-10-25