We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18a540f commit 5c012d0Copy full SHA for 5c012d0
Networking/Networking/Network/AlamofireNetwork.swift
@@ -19,6 +19,9 @@ public class AlamofireNetwork: Network {
19
///
20
public required init(credentials: Credentials) {
21
self.credentials = credentials
22
+
23
+ // A unique ID is included in the background session identifier so that the session does not get invalidated when the initializer is called multiple
24
+ // times (e.g. when logging in).
25
let uniqueID = UUID().uuidString
26
let configuration = URLSessionConfiguration.background(withIdentifier: "com.automattic.woocommerce.backgroundsession.\(uniqueID)")
27
self.backgroundSessionManager = Alamofire.SessionManager(configuration: configuration)
0 commit comments