From 624cd64cdf1ea316aa10c79995fb2cab50e4438d Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Tue, 17 Apr 2001 02:30:17 +0000 Subject: [PATCH] added close for FH in eval block for check_tcp --- src/spong-network.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/spong-network.pl b/src/spong-network.pl index 8758022..5ae3e8c 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.32 2001/02/09 01:59:38 sljohnson Exp $ +# $Id: spong-network.pl,v 1.33 2001/04/17 02:30:17 sljohnson Exp $ use Carp; use lib "@@LIBDIR@@"; @@ -368,6 +368,7 @@ sub check_tcp { select((select(SOCK), $| = 1)[0]); print SOCK "$data"; recv( SOCK, $line, 256, 0 ); # just grab a chunk from the service. + close( SOCK ) || die "close: $!"; }; alarm(0); close( SOCK ) || die "close: $!"; # close even if our alarm went off -- 2.30.2