]> dxcluster.net Git - spider.git/commitdiff
put setsockopts into eval blocks
authorminima <minima>
Sat, 12 Jan 2002 20:47:01 +0000 (20:47 +0000)
committerminima <minima>
Sat, 12 Jan 2002 20:47:01 +0000 (20:47 +0000)
Changes
perl/Msg.pm

diff --git a/Changes b/Changes
index c7fdcfceebd997003300520de5f46ad398b5c41e..3dda915118e370138a3f89a9382ed6d510a0a38d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,5 @@
+12Jan02=======================================================================
+1. put setsockopts into eval block to allow some of them to fail
 11Jan02=======================================================================
 1. Make M$ TCP connx blocking again, sigh...
 2. backed out ALL the M$ speedup and make nicer changes :-(
index 0f2f2d1d04d37771e4e9138a10c826012ea60413..d677b69248190567b4eb2031ec97ef067af54279 100644 (file)
@@ -402,9 +402,9 @@ sub nolinger
                        dbg("Linger is: $l $t, keepalive: $k, nagle: $n");
                }
                
-               setsockopt($conn->{sock}, SOL_SOCKET, SO_KEEPALIVE, 1) or confess "setsockopt keepalive: $!";
-               setsockopt($conn->{sock}, SOL_SOCKET, SO_LINGER, pack("ll", 0, 0)) or confess "setsockopt linger: $!";
-               setsockopt($conn->{sock}, IPPROTO_TCP, TCP_NODELAY, 1) or confess "setsockopt: $!";
+               eval {setsockopt($conn->{sock}, SOL_SOCKET, SO_KEEPALIVE, 1)} or confess "setsockopt keepalive: $!";
+               eval {setsockopt($conn->{sock}, SOL_SOCKET, SO_LINGER, pack("ll", 0, 0))} or confess "setsockopt linger: $!";
+               eval {setsockopt($conn->{sock}, IPPROTO_TCP, TCP_NODELAY, 1)} or eval {setsockopt($conn->{sock}, SOL_SOCKET, TCP_NODELAY, 1)} or confess "setsockopt tcp_nodelay: $!";
                $conn->{sock}->autoflush(0);
 
                if (isdbg('sock')) {