mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Dispose all running part requests when detecting revalidation request
This commit is contained in:
parent
e4c6e38c9e
commit
b53a0a5fa4
@ -787,6 +787,8 @@ private final class MultipartFetchManager {
|
||||
case .revalidateMediaReference:
|
||||
if !strongSelf.revalidatingMediaReference && !strongSelf.revalidatedMediaReference {
|
||||
strongSelf.revalidatingMediaReference = true
|
||||
strongSelf.fetchingParts.removeAll()
|
||||
|
||||
if let info = strongSelf.parameters?.info as? TelegramCloudMediaResourceFetchInfo, let revalidationContext = strongSelf.revalidationContext {
|
||||
strongSelf.revalidateMediaReferenceDisposable.set((revalidateMediaResourceReference(postbox: strongSelf.postbox, network: strongSelf.network, revalidationContext: revalidationContext, info: info, resource: strongSelf.resource)
|
||||
|> deliverOn(strongSelf.queue)).start(next: { validationResult in
|
||||
|
Loading…
x
Reference in New Issue
Block a user