mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Set a total request max retry time for network requests originating in the notification service extension.
This commit is contained in:
committed by
Stefan Ceriu
parent
690ff3caa6
commit
4e2e2649fc
@@ -16,13 +16,17 @@ extension ClientBuilder {
|
|||||||
sessionDelegate: ClientSessionDelegate,
|
sessionDelegate: ClientSessionDelegate,
|
||||||
appHooks: AppHooks,
|
appHooks: AppHooks,
|
||||||
enableOnlySignedDeviceIsolationMode: Bool,
|
enableOnlySignedDeviceIsolationMode: Bool,
|
||||||
requestTimeout: UInt64? = 30000) -> ClientBuilder {
|
requestTimeout: UInt64? = 30000,
|
||||||
|
maxRequestRetryTime: UInt64? = nil) -> ClientBuilder {
|
||||||
var builder = ClientBuilder()
|
var builder = ClientBuilder()
|
||||||
.crossProcessStoreLocksHolderName(holderName: InfoPlistReader.main.bundleIdentifier)
|
.crossProcessStoreLocksHolderName(holderName: InfoPlistReader.main.bundleIdentifier)
|
||||||
.enableOidcRefreshLock()
|
.enableOidcRefreshLock()
|
||||||
.setSessionDelegate(sessionDelegate: sessionDelegate)
|
.setSessionDelegate(sessionDelegate: sessionDelegate)
|
||||||
.userAgent(userAgent: UserAgentBuilder.makeASCIIUserAgent())
|
.userAgent(userAgent: UserAgentBuilder.makeASCIIUserAgent())
|
||||||
.requestConfig(config: .init(retryLimit: 0, timeout: requestTimeout, maxConcurrentRequests: nil, maxRetryTime: nil))
|
.requestConfig(config: .init(retryLimit: 0,
|
||||||
|
timeout: requestTimeout,
|
||||||
|
maxConcurrentRequests: nil,
|
||||||
|
maxRetryTime: maxRequestRetryTime))
|
||||||
.useEventCachePersistentStorage(value: true)
|
.useEventCachePersistentStorage(value: true)
|
||||||
|
|
||||||
builder = switch slidingSync {
|
builder = switch slidingSync {
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ final class NSEUserSession {
|
|||||||
sessionDelegate: clientSessionDelegate,
|
sessionDelegate: clientSessionDelegate,
|
||||||
appHooks: appHooks,
|
appHooks: appHooks,
|
||||||
enableOnlySignedDeviceIsolationMode: appSettings.enableOnlySignedDeviceIsolationMode,
|
enableOnlySignedDeviceIsolationMode: appSettings.enableOnlySignedDeviceIsolationMode,
|
||||||
requestTimeout: 15000)
|
requestTimeout: 15000,
|
||||||
|
maxRequestRetryTime: 5000)
|
||||||
.systemIsMemoryConstrained()
|
.systemIsMemoryConstrained()
|
||||||
.sessionPaths(dataPath: credentials.restorationToken.sessionDirectories.dataPath,
|
.sessionPaths(dataPath: credentials.restorationToken.sessionDirectories.dataPath,
|
||||||
cachePath: credentials.restorationToken.sessionDirectories.cachePath)
|
cachePath: credentials.restorationToken.sessionDirectories.cachePath)
|
||||||
|
|||||||
Reference in New Issue
Block a user