mirror of https://github.com/procxx/kepka.git
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:
parent
ab18fc6478
commit
96a0e1c237
|
@ -224,7 +224,7 @@ namespace {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
secs = m.captured(1).toInt();
|
secs = m.captured(1).toInt();
|
||||||
if (secs >= 60) return false;
|
// if (secs >= 60) return false;
|
||||||
}
|
}
|
||||||
uint64 sendAt = getms(true) + secs * 1000 + 10;
|
uint64 sendAt = getms(true) + secs * 1000 + 10;
|
||||||
DelayedRequestsList::iterator i = delayedRequests.begin(), e = delayedRequests.end();
|
DelayedRequestsList::iterator i = delayedRequests.begin(), e = delayedRequests.end();
|
||||||
|
|
|
@ -430,7 +430,7 @@ bool mtpFileLoader::loadPart() {
|
||||||
|
|
||||||
App::app()->killDownloadSessionsStop(_dc);
|
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;
|
++_queue->queries;
|
||||||
dr.v[dcIndex] += limit;
|
dr.v[dcIndex] += limit;
|
||||||
|
|
Loading…
Reference in New Issue