From 2d0473d0eac2d7489e5c4aa1108c87124873ffcf Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 9 Feb 2009 11:28:53 -0500 Subject: Better logic at finding groups of connections. --- check_postgres.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/check_postgres.pl b/check_postgres.pl index 47e42ed50..598aa9869 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -975,6 +975,8 @@ sub run_command { $group{$vname} = $conn->{$vname}; } + last GROUP if ! $foundgroup and @target; + $gbin++; ## Now break the newly created group into individual targets @@ -997,11 +999,11 @@ sub run_command { push @target, \%temptarget; $tbin++; - redo; + redo TARGET; } ## end TARGET last GROUP if ! $foundgroup; - redo; + redo GROUP; } ## end GROUP if (! @target) { -- cgit v1.2.3