-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lib] Pass isSocketConnected instead of connectionStatus to callServe…
…rEndpoint Summary: When `connectionStatus` cycles between `disconnected` and `connecting`, it causes `callServerEndpoint` to get regenerated, which results in every single action being regenerated as well. However, in `callServerEndpoint` we actually only care if `connectionStatus` is `connected` or not. We can avoid all of these actions being regenerated by passing in some more specific information to `callServerEndpoint`. This gets us closer to resolving [ENG-3612](https://linear.app/comm/issue/ENG-3612/[native]-getting-huge-number-of-unhandled-promise-rejection-when). Some more details in [this Linear comment](https://linear.app/comm/issue/ENG-3612/[native]-getting-huge-number-of-unhandled-promise-rejection-when#comment-9701ab64). However, this only solves the issue for the old-style `useServerCall`. `useKeyserverCall` is still broken because it has a harder task of caching the whole list of `KeyserverInfo`s. The following diffs will resolve that. Test Plan: Before this stack, I was able to reproduce [ENG-3612](https://linear.app/comm/issue/ENG-3612/[native]-getting-huge-number-of-unhandled-promise-rejection-when) by going to the `ThreadSettings` screen in `native` while my local `keyserver` was down. After this stack, the issue no longer repros. I also compiled a release build of the iOS app to my phone to confirm that there were no regressions in TTI, or the time it takes to open a `MessageList` and go back to the `ChatThreadList`. Reviewers: inka, rohan Reviewed By: rohan Subscribers: tomek Differential Revision: https://phab.comm.dev/D10464
- Loading branch information
Showing
4 changed files
with
24 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters