diff --git a/Sources/NextcloudKit/NKSession.swift b/Sources/NextcloudKit/NKSession.swift index c945f5c..d24fe5e 100644 --- a/Sources/NextcloudKit/NKSession.swift +++ b/Sources/NextcloudKit/NKSession.swift @@ -49,6 +49,7 @@ public class NKSession { /// Session Alamofire let configuration = URLSessionConfiguration.af.default configuration.requestCachePolicy = requestCachePolicy + configuration.multipathServiceType = .handover configuration.httpCookieStorage = HTTPCookieStorage.sharedCookieStorage(forGroupContainerIdentifier: sharedCookieStorage) sessionData = Alamofire.Session(configuration: configuration, delegate: NextcloudKitSessionDelegate(nkCommonInstance: NextcloudKit.shared.nkCommonInstance), @@ -64,6 +65,7 @@ public class NKSession { configurationDownloadBackground.isDiscretionary = false configurationDownloadBackground.httpMaximumConnectionsPerHost = 5 configurationDownloadBackground.requestCachePolicy = requestCachePolicy + configurationDownloadBackground.multipathServiceType = .handover configurationDownloadBackground.httpCookieStorage = HTTPCookieStorage.sharedCookieStorage(forGroupContainerIdentifier: sharedCookieStorage) sessionDownloadBackground = URLSession(configuration: configurationDownloadBackground, delegate: backgroundSessionDelegate, delegateQueue: OperationQueue.main) @@ -74,6 +76,7 @@ public class NKSession { configurationUploadBackground.isDiscretionary = false configurationUploadBackground.httpMaximumConnectionsPerHost = 5 configurationUploadBackground.requestCachePolicy = requestCachePolicy + configurationUploadBackground.multipathServiceType = .handover configurationUploadBackground.httpCookieStorage = HTTPCookieStorage.sharedCookieStorage(forGroupContainerIdentifier: sharedCookieStorage) sessionUploadBackground = URLSession(configuration: configurationUploadBackground, delegate: backgroundSessionDelegate, delegateQueue: OperationQueue.main) @@ -95,6 +98,7 @@ public class NKSession { configurationUploadBackgroundExt.httpMaximumConnectionsPerHost = 5 configurationUploadBackgroundExt.requestCachePolicy = requestCachePolicy configurationUploadBackgroundExt.sharedContainerIdentifier = groupIdentifier + configurationUploadBackgroundExt.multipathServiceType = .handover configurationUploadBackgroundExt.httpCookieStorage = HTTPCookieStorage.sharedCookieStorage(forGroupContainerIdentifier: sharedCookieStorage) sessionUploadBackgroundExt = URLSession(configuration: configurationUploadBackgroundExt, delegate: backgroundSessionDelegate, delegateQueue: OperationQueue.main) }