|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re^3: Get Timout with LWPby tachyon (Chancellor) |
| on Jun 22, 2004 at 01:45 UTC ( #368598=note: print w/ replies, xml ) | Need Help?? |
|
Unfortunately I am not wrong. The hanging behaviour is real. The underlying reason is LWP::Simple uses (for http) the _http_trivial_get() function, not LWP::UserAgent. This implements a 60 second IO::Socket::INET make connection timeout, but no timeout on data recieve. Modifying the test code to use LWP::Simple proves the point (LWP::Simple will wait 500 seconds to get the data - it gets an instant socket, then nothing for 500 seconds). This function remains active in the latest LWP::Simple. I agree it should really be a subclass of LWP::UserAgent but for http it is not. The timeout behaviour for LWP::Simple and LWP::UserAgent could IMHO use some work.
cheers tachyon
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||