Re: Timeout not working like I would expect

Marc Langheinrich (marclang@cs.washington.edu)
Thu, 18 Feb 1999 16:43:47 +0900


>I would expect the
>timeout logic to kick in when the elapsed time of the HTTP GET exceeds
>the 30 second timeout parameter.  When the initial connection is made
>within the timeout parameter and successive reads from the server are
>within the timeout window, LWP misses the timeout.
I'd call this a feature, not a bug. When I set a timeout, I usually expect
this to kick in when NO data is transferred within the specified time frame.
It's the same with your browser: It will return "Server not available" if
after 30 seconds or so it doesn't get a response, but I would be mighty
upset if my browser would cut any steady download after a fixed amount of 30
seconds!

If you want this kind of behavior you have to install your own ALARM signal,
which will throw you a signal after exactly 30 seconds. Then you can
manually cut the connection if you need to. You can read more about this in
the perlipc manpage (search for "ALRM")

Marc