Forgot to Cc: the list on this reply to Octavian. ---------- Forwarded message ---------- From: Gisle Aas <[EMAIL PROTECTED]> Date: Mon, May 5, 2008 at 10:47 PM Subject: Re: timeout To: Octavian Rasnita <[EMAIL PROTECTED]>
On Sun, May 4, 2008 at 12:11 PM, Octavian Rasnita <[EMAIL PROTECTED]> wrote: > Hi, > > If the network connection is broken, is there a way of setting a timeout > after which the LWP request returns? No, not really. > I've seen that even if I set the timeout to 1 second, it takes much more > time until the request ends. The $ua->timeout() will abort a connection attempt that takes more than the given number of seconds, but before LWP start the connect call, it looks up the hostname which can take time that's not limited by LWP. After the connection has been established, the timeout value is used to terminate requests on sockets with no activity (data coming back) for the given amount of time. But as long as some data comes in at least every timeout sec LWP will keep on processing the requests. Regards, Gisle