delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/08/14/15:06:19

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Authentication-Warning: ginger.cc.utexas.edu: grouse owned process doing -bs
Date: Tue, 14 Aug 2001 13:59:25 -0500 (CDT)
From: Michael Hoffman <hoffmanm AT cshl DOT org>
To: Cygwin <cygwin AT cygwin DOT com>, LWP <libwww AT perl DOT org>
Subject: Cygwin Perl LWP timeout workaround
Message-ID: <Pine.A41.4.21.0108141329350.26132-100000@ginger.cc.utexas.edu>
MIME-Version: 1.0

I seem to get intermittent socket timeout problems with perl's LWP
(libwww-perl). I unfortunately cannot reproduce the problem reliably,
so debugging it is almost impossible. Even if I supply a large timeout
value (300 s), LWP sometimes returns a timeout immediately.

In /usr/lib/perl5/5.6.1/cygwin/IO/Socket.pm, the connect subroutine
sets $sock->blocking(0) if there is a timeout value. (Shouldn't a
timeout value turn blocking on?)

I'd work on this more, but I unfortunately can't 

One workaround is to change
/usr/lib/perl5/site_perl/5.6.1/LWP/Protocol/http.pm to stop passing
Timeout values. I got the idea from an earlier post on the cygwin
mailing list regarding Net::SMTP and Net::POP3:

http://sources.redhat.com/ml/cygwin/2001-05/msg00411.html

My cygcheck and perl -V are at the bottom of this message:

http://sources.redhat.com/ml/cygwin/2001-08/msg00028.html

And here's a one-character patch:

--- http.pm.bak Tue Aug 14 14:25:44 2001
+++ http.pm     Tue Aug 14 14:37:58 2001
@@ -28,7 +28,7 @@
     my $sock = IO::Socket::INET->new(PeerAddr => $host,
                                     PeerPort => $port,
                                     Proto    => 'tcp',
-                                    Timeout  => $timeout,
+#                                   Timeout  => $timeout,
                                     $self->_extra_sock_opts($host,
				     $port),
                                    );
     unless ($sock) {
--
Michael Hoffman <hoffmanm AT cshl DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019