mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01: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;
|
finished = true;
|
||||||
qCDebug(scriptengine) << "Done downloading script at:" << url.toString();
|
qCDebug(scriptengine) << "Done downloading script at:" << url.toString();
|
||||||
} else {
|
} 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;
|
++scriptRequest.numRetries;
|
||||||
|
|
||||||
qDebug() << "Script request failed: " << url;
|
qDebug() << "Script request failed: " << url;
|
||||||
|
|
Loading…
Reference in a new issue