From d5d31ecca1bfc4b16f728fc5ad2029efb72c7483 Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Tue, 22 Feb 2000 05:14:55 +0000 Subject: [PATCH] added eval block around status() to prevent aborts if can't connect to 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