push @servers, $server;
}
}
- else
+ elsif ($cluster->{requests} > 0)
{
my $server = {
cluster => $cluster,
push @servers, $server;
}
+ else
+ {
+ $cluster->{servers} = [];
+ }
$cluster->{name} = $name;
$cluster->{status} = "down";
}
}
+# Abort if no servers at all are up
+exit 0 unless grep { $_->{status} eq "up" } values(%$clusters);
+
# Create target origins object
my $targetorigins = {};