From: Stephen L Johnson Date: Thu, 10 Feb 2000 02:21:08 +0000 (+0000) Subject: &status() is called inside an eval block to prevent die'ing from failure to X-Git-Tag: spong-2_6c~2 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06a5126d953e404b64d693ab05291ef092fc4cec;p=spong.git &status() is called inside an eval block to prevent die'ing from failure to connect with spong-server --- 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