summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-02-23 16:00:29 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-02-23 16:00:29 +0000
commitf9c1db8d349c8100068c1d6cf6918578d07e8c92 (patch)
tree4287fed6ac95d4874586f6ea051b05149985d45c /ext
parent5345e62f7ed2024b0a7194c9964e510614ece5e7 (diff)
downloadperl-f9c1db8d349c8100068c1d6cf6918578d07e8c92.tar.gz
Streamline #5218 even more.
p4raw-id: //depot/cfgperl@5221
Diffstat (limited to 'ext')
-rw-r--r--ext/IO/lib/IO/Socket.pm19
1 files changed, 7 insertions, 12 deletions
diff --git a/ext/IO/lib/IO/Socket.pm b/ext/IO/lib/IO/Socket.pm
index 53c2ff66a7..2981516efc 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 {