From: mlelstv@serpens.de Date: Sun, 21 May 2006 04:23:38 +0000 (-0700) Subject: [perl #39178] IO::Socket::connect returns wrong errno on timeout X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6c0de24b4fddea96b9fa338443855c77f57711b2;p=p5sagit%2Fp5-mst-13.2.git [perl #39178] IO::Socket::connect returns wrong errno on timeout From: "mlelstv@serpens.de (via RT)" Message-ID: p4raw-id: //depot/perl@28346 --- diff --git a/ext/IO/lib/IO/Socket.pm b/ext/IO/lib/IO/Socket.pm index fe887d4..5d78322 100644 --- a/ext/IO/lib/IO/Socket.pm +++ b/ext/IO/lib/IO/Socket.pm @@ -117,6 +117,7 @@ sub connect { my $sel = new IO::Select $sock; + undef $!; if (!$sel->can_write($timeout)) { $err = $! || (exists &Errno::ETIMEDOUT ? &Errno::ETIMEDOUT : 1); $@ = "connect: timeout";