mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 04:03:59 +02:00
bail early from irrecoverable retry situations
This commit is contained in:
parent
2139e979da
commit
61452c21a2
1 changed files with 8 additions and 1 deletions
|
@ -202,7 +202,14 @@ void ScriptCache::scriptContentAvailable() {
|
|||
finished = true;
|
||||
qCDebug(scriptengine) << "Done downloading script at:" << url.toString();
|
||||
} else {
|
||||
if (scriptRequest.numRetries < MAX_RETRIES) {
|
||||
auto result = req->getResult();
|
||||
bool irrecoverable =
|
||||
result == ResourceRequest::AccessDenied ||
|
||||
result == ResourceRequest::InvalidURL ||
|
||||
result == ResourceRequest::NotFound ||
|
||||
scriptRequest.numRetries >= MAX_RETRIES;
|
||||
|
||||
if (!irrecoverable) {
|
||||
++scriptRequest.numRetries;
|
||||
|
||||
qDebug() << "Script request failed: " << url;
|
||||
|
|
Loading…
Reference in a new issue