X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/aadaa45530a169c37ceb95c3ed76644ccbd2a644..6c0de24b4fddea96b9fa338443855c77f57711b2:/ext/IO/lib/IO/Socket.pm 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";