This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Cygwin Perl LWP timeout workaround


On Fri, 17 Aug 2001, Eric Yablonowitz wrote:

> Thanks for posting this workaround.  It has helped me immeasurably.
> The funny thing is that I experience a very similar timeout problem
> using Net::FTP as well as LWP.  Anyone know if these could be
> related?

As I've said before, this problem is very hard to diagnose because I
haven't found any way to reproduce it reliably. If anyone else has,
please let me know.

But here's what I've found:

IO::Socket::connect() makes IO non-blocking if there is a timeout
value given.

    $blocking = $sock->blocking(0) if $timeout;

Shouldn't a timeout value mean that IO should be blocking? Can someone
please answer this even if they don't have anything else to add?

If so, then this seems consistent with intermittent failures, i.e., if
non-blocking IO is used and the response doesn't come in RIGHT AWAY, a
timeout result is returned?

However, Solaris's IO::Socket::connect() seems to do the same thing
and I haven't heard of problems with it, although I haven't done
extensive usage to get this bug to arise.
--
Michael Hoffman <hoffmanm@cshl.org>
Cold Spring Harbor Laboratory




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]