Skip to content

Commit 18a540f

Browse files
committed
Assign a unique ID to the background session on every AlamofireNetwork init.
1 parent 9fb3d9d commit 18a540f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Networking/Networking/Network/AlamofireNetwork.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public class AlamofireNetwork: Network {
1919
///
2020
public required init(credentials: Credentials) {
2121
self.credentials = credentials
22-
let configuration = URLSessionConfiguration.background(withIdentifier: "com.automattic.woocommerce.backgroundsession")
22+
let uniqueID = UUID().uuidString
23+
let configuration = URLSessionConfiguration.background(withIdentifier: "com.automattic.woocommerce.backgroundsession.\(uniqueID)")
2324
self.backgroundSessionManager = Alamofire.SessionManager(configuration: configuration)
2425
}
2526

0 commit comments

Comments
 (0)