summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2011-08-15 21:30:41 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2011-08-15 21:30:41 +0100
commitc192154b7b5060196110d20f17b18135fa216641 (patch)
tree667a778e1f73df34c1eafba4b9ebc645a3feabb5 /dist
parentf1d35e3443aa8451bf47be80983076fe28626113 (diff)
downloadperl-c192154b7b5060196110d20f17b18135fa216641.tar.gz
Fix tabbing and trailing whitespace from commit f1d35e3443
and bump IO::Socket version.
Diffstat (limited to 'dist')
-rw-r--r--dist/IO/lib/IO/Socket.pm32
1 files changed, 16 insertions, 16 deletions
diff --git a/dist/IO/lib/IO/Socket.pm b/dist/IO/lib/IO/Socket.pm
index 06e4e6cb62..ce493b55b2 100644
--- a/dist/IO/lib/IO/Socket.pm
+++ b/dist/IO/lib/IO/Socket.pm
@@ -23,7 +23,7 @@ require IO::Socket::UNIX if ($^O ne 'epoc' && $^O ne 'symbian');
@ISA = qw(IO::Handle);
-$VERSION = "1.32";
+$VERSION = "1.33";
@EXPORT_OK = qw(sockatmark);
@@ -118,21 +118,21 @@ sub connect {
my $sel = new IO::Select $sock;
undef $!;
- my($r,$w,$e) = IO::Select::select(undef,$sel,$sel,$timeout);
- if(@$e[0]) {
- # Windows return from select after the timeout in case of
- # WSAECONNREFUSED(10061) if exception set is not used.
- # This behavior is different from Linux.
- # Using the exception
- # set we now emulate the behavior in Linux
- # - Karthik Rajagopalan
- $err = $sock->getsockopt(SOL_SOCKET,SO_ERROR);
- $@ = "connect: $err";
- }
- elsif(!@$w[0]) {
- $err = $! || (exists &Errno::ETIMEDOUT ? &Errno::ETIMEDOUT : 1);
- $@ = "connect: timeout";
- }
+ my($r,$w,$e) = IO::Select::select(undef,$sel,$sel,$timeout);
+ if(@$e[0]) {
+ # Windows return from select after the timeout in case of
+ # WSAECONNREFUSED(10061) if exception set is not used.
+ # This behavior is different from Linux.
+ # Using the exception
+ # set we now emulate the behavior in Linux
+ # - Karthik Rajagopalan
+ $err = $sock->getsockopt(SOL_SOCKET,SO_ERROR);
+ $@ = "connect: $err";
+ }
+ elsif(!@$w[0]) {
+ $err = $! || (exists &Errno::ETIMEDOUT ? &Errno::ETIMEDOUT : 1);
+ $@ = "connect: timeout";
+ }
elsif (!connect($sock,$addr) &&
not ($!{EISCONN} || ($! == 10022 && $^O eq 'MSWin32'))
) {