error if ping fails, rather than printing debug

master
Joey Hess 2008-08-11 13:03:30 -04:00
parent 49d56c3957
commit 88e389ef1e
1 changed files with 3 additions and 3 deletions

View File

@ -579,15 +579,15 @@ sub pingurl (@) { #{{{
$title, $url);
my $res = $client->send_request($req);
if (! ref $res) {
debug("Did not receive response to ping");
error("Did not receive response to ping");
}
my $r=$res->value;
if (! exists $r->{flerror} || $r->{flerror}) {
debug("Ping rejected: ".(exists $r->{message} ? $r->{message} : "[unknown reason]"));
error("Ping rejected: ".(exists $r->{message} ? $r->{message} : "[unknown reason]"));
}
};
if ($@) {
debug "Ping failed: $@";
error "Ping failed: $@";
}
}
}