]> git.etc.gen.nz Git - spong.git/commitdiff
added eval block around status() to prevent aborts if can't connect to server
authorStephen L Johnson <sjohnson@monsters.org>
Tue, 22 Feb 2000 05:14:55 +0000 (05:14 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Tue, 22 Feb 2000 05:14:55 +0000 (05:14 +0000)
src/spong-network.pl

index ccc5a0faab618102680f3f8b121c5e0583680575..52ba2f9a9679ddb2040b3a16bfb1645aec01b62c 100755 (executable)
@@ -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