From 08346a5fe6c2edc33ce2826e5d69202fa694f2b1 Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Thu, 18 Apr 2002 15:39:00 +0000 Subject: [PATCH] fixed another exit point with missing alarm(0 reset in check_tcp() --- src/spong-network.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spong-network.pl b/src/spong-network.pl index 5993db0..05dff0b 100755 --- a/src/spong-network.pl +++ b/src/spong-network.pl @@ -17,7 +17,7 @@ # (2) Converted checks to new plugin mechanism (Stephen Johnson May 28, 1999) # Added user-configurable escalation mechanism # -# $Id: spong-network.pl,v 1.40 2001/06/20 21:18:54 sljohnson Exp $ +# $Id: spong-network.pl,v 1.41 2002/04/18 15:39:00 sljohnson Exp $ use Carp; use lib "@@LIBDIR@@"; @@ -375,7 +375,8 @@ sub check_tcp { while (length($msg) < $maxlen) { recv( SOCK, $line, 256, 0 ); $msg .= $line; - if (length($line) == 0) { return; } # If the socket is closed, return + # If the socket is closed, exit the loop + if (length($line) == 0) { last; } } alarm(0); close( SOCK ) || die "close: $!"; -- 2.30.2