Skip to content
Snippets Groups Projects
Commit c7e0d8c3 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

add some better logging when HTTP server start fails, and make the failure

really hard if the test server can't be resolved (like for ::1 ipv6)
parent fee4f8c8
No related branches found
No related tags found
No related merge requests found
......@@ -529,12 +529,12 @@ sub verifyhttp {
}
elsif($res == 6) {
# curl: (6) Couldn't resolve host '::1'
logmsg "RUN: failed to resolve host\n";
return 0;
logmsg "RUN: failed to resolve host ($proto://$ip:$port/verifiedserver)\n";
return -1;
}
elsif($data || ($res != 7)) {
logmsg "RUN: Unknown server is running on port $port\n";
return 0;
return -1;
}
return $pid;
}
......@@ -631,9 +631,13 @@ sub verifyserver {
$pid = &$fun($proto, $ip, $port);
if($pid) {
if($pid > 0) {
last;
}
elsif($pid < 0) {
# a real failure, stop trying and bail out
return 0;
}
sleep(1);
}
return $pid;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment