[perl #39178] IO::Socket::connect returns wrong errno on timeout
authormlelstv@serpens.de <mlelstv@serpens.de>
Sun, 21 May 2006 04:23:38 +0000 (21:23 -0700)
committerSteve Peters <steve@fisharerojo.org>
Thu, 1 Jun 2006 19:11:38 +0000 (19:11 +0000)
From: "mlelstv@serpens.de (via RT)" <perlbug-followup@perl.org>
Message-ID: <rt-3.0.11-39178-133695.13.7935957232893@perl.org>

p4raw-id: //depot/perl@28346

ext/IO/lib/IO/Socket.pm

index fe887d4..5d78322 100644 (file)
@@ -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";