]> git.etc.gen.nz Git - spong.git/commitdiff
&status() is called inside an eval block to prevent die'ing from failure to
authorStephen L Johnson <sjohnson@monsters.org>
Thu, 10 Feb 2000 02:21:08 +0000 (02:21 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Thu, 10 Feb 2000 02:21:08 +0000 (02:21 +0000)
connect with spong-server

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