mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix one more crash in CDN file download.
The sessionTimedOut could remove a session right between a request for a file part and a request for additional cdn file hashes. In this case requestData.sessionIndex was not updated and this was leading to an assertion violation in changeRequestedAmount.
This commit is contained in:
parent
63020ec302
commit
960f50824d
1 changed files with 3 additions and 1 deletions
|
@ -252,7 +252,9 @@ void DownloadManagerMtproto::requestSucceeded(
|
||||||
|
|
||||||
if (duration >= kBadRequestDurationThreshold) {
|
if (duration >= kBadRequestDurationThreshold) {
|
||||||
DEBUG_LOG(("Duration too large, signaling time out."));
|
DEBUG_LOG(("Duration too large, signaling time out."));
|
||||||
sessionTimedOut(dcId, index);
|
crl::on_main(this, [=] {
|
||||||
|
sessionTimedOut(dcId, index);
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (amountAtRequestStart == data.maxWaitedAmount
|
if (amountAtRequestStart == data.maxWaitedAmount
|
||||||
|
|
Loading…
Add table
Reference in a new issue