From b8df30c344a8805053f889eda4fd17d85dca1b9e Mon Sep 17 00:00:00 2001 From: minima Date: Sat, 12 Jan 2002 20:47:01 +0000 Subject: [PATCH] put setsockopts into eval blocks --- Changes | 2 ++ perl/Msg.pm | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index c7fdcfce..3dda9151 100644 --- 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 :-( diff --git a/perl/Msg.pm b/perl/Msg.pm index 0f2f2d1d..d677b692 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -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')) { -- 2.43.0