mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Fix a bug where the app wouldn't retry when the server rate-limits its requests. (#5022)
Change the retry limit to 3. Without this the SDK immediately fails when rate-limited instead of waiting and trying again.
This commit is contained in:
@@ -27,7 +27,7 @@ extension ClientBuilder {
|
|||||||
.setSessionDelegate(sessionDelegate: sessionDelegate)
|
.setSessionDelegate(sessionDelegate: sessionDelegate)
|
||||||
.userAgent(userAgent: UserAgentBuilder.makeASCIIUserAgent())
|
.userAgent(userAgent: UserAgentBuilder.makeASCIIUserAgent())
|
||||||
.threadsEnabled(enabled: threadsEnabled, threadSubscriptions: threadsEnabled)
|
.threadsEnabled(enabled: threadsEnabled, threadSubscriptions: threadsEnabled)
|
||||||
.requestConfig(config: .init(retryLimit: 0,
|
.requestConfig(config: .init(retryLimit: 3, // Must be non-zero for the SDK to retry API calls when rate-limited.
|
||||||
timeout: requestTimeout,
|
timeout: requestTimeout,
|
||||||
maxConcurrentRequests: nil,
|
maxConcurrentRequests: nil,
|
||||||
maxRetryTime: maxRequestRetryTime))
|
maxRetryTime: maxRequestRetryTime))
|
||||||
|
|||||||
Reference in New Issue
Block a user