From 06a5126d953e404b64d693ab05291ef092fc4cec Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Thu, 10 Feb 2000 02:21:08 +0000 Subject: [PATCH] &status() is called inside an eval block to prevent die'ing from failure to connect with spong-server --- src/spong-network.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/spong-network.pl b/src/spong-network.pl index ccc5a0f..52ba2f9 100755 --- a/src/spong-network.pl +++ b/src/spong-network.pl @@ -129,7 +129,12 @@ sub do_check { # undef $HOSTS{$host}->{'service'}->{$service}->{'count'}; # } - &status( $SPONGSERVER, $host, $service, $color, $summary, $message ); + eval { + &status( $SPONGSERVER, $host, $service, $color, $summary, $message ); + }; + if ($@) { + &error("$@"); + } } # A generic tcp port checking routine. You give this function a hostname, a -- 2.30.2