Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions judge/judgedaemon.main.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@ function request(string $url, string $verb = 'GET', $data = '', bool $failonerro
": http status code: " . $status .
", request size = " . strlen(print_r($data, true)) .
", response: " . $response;
if ($status == 500) {
break;
}
} else {
$succeeded = true;
break;
Expand Down Expand Up @@ -757,9 +754,12 @@ function fetch_executable_internal(

// Request open submissions to judge. Any errors will be treated as
// non-fatal: we will just keep on retrying in this loop.
$row = [];
$judging = request('judgehosts/fetch-work', 'POST', ['hostname' => $myhost], false);
// If $judging is null, an error occurred; don't try to decode.
if (!is_null($judging)) {
// If $judging is null, an error occurred; we marked the endpoint already as errorred above.
if (is_null($judging)) {
continue;
} else {
$row = dj_json_decode($judging);
}

Expand Down
Loading