Skip to content

Commit

Permalink
( multipathServiceType )
Browse files Browse the repository at this point in the history
Signed-off-by: Marino Faggiana <[email protected]>
  • Loading branch information
marinofaggiana committed Nov 5, 2024
1 parent 1a54b9a commit 6f80c4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/NextcloudKit/NKSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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)

Expand All @@ -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)

Expand All @@ -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)
}
Expand Down

0 comments on commit 6f80c4d

Please sign in to comment.