From: Stephen L Johnson Date: Tue, 17 Apr 2001 02:30:17 +0000 (+0000) Subject: added close for FH in eval block for check_tcp X-Git-Tag: spong-2_7_4~7 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=624cd64cdf1ea316aa10c79995fb2cab50e4438d;p=spong.git added close for FH in eval block for check_tcp --- 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