Skip to content

Commit

Permalink
Fix crash on ResourseLoaderDelegate invalidateAndCancelSession
Browse files Browse the repository at this point in the history
  • Loading branch information
sukov committed Aug 19, 2024
1 parent ad891b4 commit d4c7514
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/ResourceLoaderDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ final class ResourceLoaderDelegate: NSObject, AVAssetResourceLoaderDelegate, URL
session?.invalidateAndCancel()
session = nil
bufferData = Data()
pendingRequests.removeAll()
pendingRequestsValue.removeAll()

// We need to only remove the file if it hasn't been fully downloaded
guard isDownloadComplete == false else { return }
Expand Down

0 comments on commit d4c7514

Please sign in to comment.