add back on fail when server unavailable

This commit is contained in:
Stephen Birarda 2016-04-21 17:07:29 -07:00
parent 3a8c2144bf
commit 8cd330f431

View file

@ -615,6 +615,9 @@ void Resource::handleReplyFinished() {
if (_attempts++ < MAX_ATTEMPTS) {
auto waitTime = BASE_DELAY_MS * (int)pow(2.0, _attempts);
qCDebug(networking) << "Server unavailable for" << _url << "- may retry in" << waitTime << "ms"
<< "if resource is still needed";
QTimer::singleShot(waitTime, this, &Resource::attemptRequest);
break;
}