Fix crash in CDN file download.
This commit is contained in:
parent
6820b0b3b3
commit
12873f8be0
|
@ -495,11 +495,14 @@ void DownloadMtprotoTask::removeSession(int sessionIndex) {
|
|||
}
|
||||
}
|
||||
for (const auto &[requestId, offset] : redirect) {
|
||||
const auto needMakeRequest = (requestId != _cdnHashesRequestId);
|
||||
cancelRequest(requestId);
|
||||
if (needMakeRequest) {
|
||||
const auto newIndex = _owner->chooseSessionIndex(dcId());
|
||||
Assert(newIndex < sessionIndex);
|
||||
makeRequest({ offset, newIndex });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mtpRequestId DownloadMtprotoTask::sendRequest(
|
||||
|
|
Loading…
Reference in New Issue