Skip to content

Commit 5c012d0

Browse files
committed
Add comment to the unique ID in background session identifier.
1 parent 18a540f commit 5c012d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Networking/Networking/Network/AlamofireNetwork.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public class AlamofireNetwork: Network {
1919
///
2020
public required init(credentials: Credentials) {
2121
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).
2225
let uniqueID = UUID().uuidString
2326
let configuration = URLSessionConfiguration.background(withIdentifier: "com.automattic.woocommerce.backgroundsession.\(uniqueID)")
2427
self.backgroundSessionManager = Alamofire.SessionManager(configuration: configuration)

0 commit comments

Comments
 (0)