mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +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)
|
||||
.userAgent(userAgent: UserAgentBuilder.makeASCIIUserAgent())
|
||||
.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,
|
||||
maxConcurrentRequests: nil,
|
||||
maxRetryTime: maxRequestRetryTime))
|
||||
|
||||
Reference in New Issue
Block a user