Skip to content

Commit 20fc7b5

Browse files
clear all tasks when URLSessionClient gets deinited
1 parent cf9c1ea commit 20fc7b5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Sources/Apollo/URLSessionClient.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ open class URLSessionClient: NSObject, URLSessionDelegate, URLSessionTaskDelegat
4141
delegateQueue: callbackQueue)
4242
}
4343

44+
deinit {
45+
self.clearAllTasks()
46+
}
47+
4448
/// Clears underlying dictionaries of any data related to a particular task identifier.
4549
///
4650
/// - Parameter identifier: The identifier of the task to clear.

0 commit comments

Comments
 (0)