From: Jarkko Hietaniemi Date: Wed, 23 Feb 2000 16:00:29 +0000 (+0000) Subject: Streamline #5218 even more. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f9c1db8d349c8100068c1d6cf6918578d07e8c92;p=p5sagit%2Fp5-mst-13.2.git Streamline #5218 even more. p4raw-id: //depot/cfgperl@5221 --- diff --git a/ext/IO/lib/IO/Socket.pm b/ext/IO/lib/IO/Socket.pm index 53c2ff6..2981516 100644 --- a/ext/IO/lib/IO/Socket.pm +++ b/ext/IO/lib/IO/Socket.pm @@ -115,18 +115,13 @@ sub connect { $err = $! || (exists &Errno::ETIMEDOUT ? &Errno::ETIMEDOUT : 1); $@ = "connect: timeout"; } - elsif(!connect($sock,$addr)) { - if ($!{EISCONN}) { - # Some systems (e.g. Digital UNIX/Tru64) fail to - # re-connect() to an already open socket and set - # errno to EISCONN (Socket is already connected) - # for such an attempt. - $err = 0; - } else { - # But in other cases, there is no redemption. - $err = $!; - $@ = "connect: $!"; - } + elsif(!connect($sock,$addr) && not $!{EISCONN}) { + # Some systems (e.g. Digital UNIX/Tru64) fail to + # re-connect() to an already open socket and set + # errno to EISCONN (Socket is already connected) + # for such an attempt. + $err = $!; + $@ = "connect: $!"; } } else {