File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Networking/Networking/Network Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ 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+
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) " )
2327 self . backgroundSessionManager = Alamofire . SessionManager ( configuration: configuration)
2428 }
2529
You can’t perform that action at this time.
0 commit comments