From c9b73a6f1b6aa8c0496a6a7afd1542806ac1a577 Mon Sep 17 00:00:00 2001 From: minima Date: Thu, 10 Jan 2002 22:03:32 +0000 Subject: [PATCH] add some linger debugging --- Changes | 1 + perl/Msg.pm | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/Changes b/Changes index 4720a69e..ed992bdc 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ 10Jan02======================================================================= 1. set SO_LINGER = 0 to try to prevent the system sending data on a closing socket. This MAY help some of the hanging problems. +2. do the same on the C client (which means DON'T FORGET to make it). 08Jan02======================================================================= 1. altered sh/qrz to point to the new server 2. alter the character set handling a bit to make it better for spanish diff --git a/perl/Msg.pm b/perl/Msg.pm index 15dc26d4..746878e2 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -359,7 +359,16 @@ sub new_server { sub nolinger { my $conn = shift; + my $buf; + if (isdbg('sock') && ($buf = getsockopt($conn->{sock}, SOL_SOCKET, SO_LINGER))) { + my ($l, $t) = unpack("ll", $buf); + dbg("Linger is: $buf = $l $t"); + } setsockopt($conn->{sock}, SOL_SOCKET, SO_LINGER, pack("ll", 0, 0)) or confess "setsockopt: $!"; + if (isdbg('sock') && ($buf = getsockopt($conn->{sock}, SOL_SOCKET, SO_LINGER))) { + my ($l, $t) = unpack("ll", $buf); + dbg("Linger is: $buf = $l $t"); + } } sub dequeue -- 2.43.0