Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the unnecessary network reconnect #732

Merged
merged 2 commits into from
Oct 24, 2024
Merged

Conversation

ruixhuang
Copy link
Contributor

During the iOS app starts up, the _environment is set twice with the same value. This causes the indexer websocket to reject the second try due to rate-limiting. We should only do reconnect when there is a real change (ie. env id is different).

@ruixhuang ruixhuang marked this pull request as ready for review October 24, 2024 22:55
@@ -89,8 +89,8 @@ class AsyncAbacusStateManagerV2(

private var environments: IList<V4Environment> = iListOf()
set(value) {
field = value
ioImplementations.threading?.async(ThreadingType.abacus) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for threading switch 'cos it's called from the same thread.

@mike-dydx mike-dydx self-requested a review October 24, 2024 23:08
@mike-dydx mike-dydx merged commit c926adc into main Oct 24, 2024
3 checks passed
@mike-dydx mike-dydx deleted the feature/ios_list_fix branch October 24, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants