dsa-check-zone-rrsig-expiration-many: stop waiting for the timeout after the last...
[mirror/dsa-nagios.git] / dsa-nagios-checks / checks / dsa-check-zone-rrsig-expiration-many
index 5d9342f..cfbacfd 100755 (executable)
@@ -177,7 +177,9 @@ while (time - $begin <= $params->{timeout}) {
                else { push @{$count->{'unknown'}}, $zone; };
                delete $threads{$zone};
        }
-       sleep(1) unless scalar keys %threads == 0;
+       # print STDERR "foo #threads:", (scalar keys %threads), ":", join(",", keys %threads),"\n";
+       last if scalar keys %threads == 0;
+       sleep 1;
 }
 for my $zone (sort {$a cmp $b} keys %threads) {
        push @{$count->{'warn'}}, $zone;