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

Fix handling of instance/network down #769

Closed
wants to merge 1 commit into from

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented Sep 26, 2023

I am making this PR a draft as a different approach has been suggested.

Pull Request Description

This PR fixes an issue raised in Matrix chat which is that, if the user's network or instance is currently down, Thunder will spin forever (and also be frozen, such that the user cannot switch accounts). This is because, as of #717, we now do a downvote check during account loading (which precedes the network handling introduced in #655).

The fix is simply to wrap this initial check in a try/catch and add a timeout so that it can't kill us. Then we'll proceed with the feed loading, which is where the network handling exists. I suppose there's a tiny edge case where (a) we're connecting to an instance with downvotes disabled, (b) the downvote check fails (i.e., temporary outage), and (c) the feed loading succeeds. In this case, the downvote buttons will appear but not work. I hope this is such a narrow case and negilble impact that it will be acceptable.

I also updated some timeouts throughout the app to be more consistent.

Issue Being Fixed

Issue Number: N/A

Screenshots / Recordings

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@micahmo micahmo mentioned this pull request Sep 26, 2023
3 tasks
@micahmo
Copy link
Member Author

micahmo commented Sep 26, 2023

This can be closed when #770 is merged.

@hjiangsu
Copy link
Member

Closing as #770 is merged!

@hjiangsu hjiangsu closed this Sep 27, 2023
@micahmo micahmo deleted the fix/handle-down branch September 27, 2023 14:43
@hjiangsu hjiangsu mentioned this pull request Apr 10, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants