Resending requests even if received FLOOD_WAIT_N, N >= 60.

This will fix the infinite large files downloading, because sometimes
server replies with FLOOD_WAIT_N with N > 300, up to 900.
This commit is contained in:
John Preston 2016-09-07 14:14:24 +03:00
parent ab18fc6478
commit 96a0e1c237
2 changed files with 2 additions and 2 deletions

View File

@ -224,7 +224,7 @@ namespace {
}
} else {
secs = m.captured(1).toInt();
if (secs >= 60) return false;
// if (secs >= 60) return false;
}
uint64 sendAt = getms(true) + secs * 1000 + 10;
DelayedRequestsList::iterator i = delayedRequests.begin(), e = delayedRequests.end();

View File

@ -430,7 +430,7 @@ bool mtpFileLoader::loadPart() {
App::app()->killDownloadSessionsStop(_dc);
mtpRequestId reqId = MTP::send(MTPupload_GetFile(MTPupload_getFile(loc, MTP_int(offset), MTP_int(limit))), rpcDone(&mtpFileLoader::partLoaded, offset), rpcFail(&mtpFileLoader::partFailed), MTP::dldDcId(_dc, dcIndex), 50);
mtpRequestId reqId = MTP::send(MTPupload_GetFile(loc, MTP_int(offset), MTP_int(limit)), rpcDone(&mtpFileLoader::partLoaded, offset), rpcFail(&mtpFileLoader::partFailed), MTP::dldDcId(_dc, dcIndex), 50);
++_queue->queries;
dr.v[dcIndex] += limit;