From: Stephen L Johnson Date: Tue, 22 Feb 2000 05:14:55 +0000 (+0000) Subject: added eval block around status() to prevent aborts if can't connect to server X-Git-Tag: spong-2_7-alpha5~78 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5d31ecca1bfc4b16f728fc5ad2029efb72c7483;p=spong.git added eval block around status() to prevent aborts if can't connect to 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