-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not always error out api calls when web socket initially fail…
…ed (#1495) ## Problem Currently for all axios requests, we wait for `connectionIdPromise`. This promise is rejected or resolved based on the first WS connect attempt. If subsequent reconnects were successful but the first connect was rejected, this promise would still stay rejected. ## Solution To allow for reconnects to resolve, say for example, in 3rd try the connection got open, we can wait for the `connectionOpen` promise to resolve. To allow for 2 or 3 retries, we use `_waitForHealthy` function here. Alternatively we could await only on `connectionOpen` promise without allowing for timeouts to wait for reconnections also.
- Loading branch information
1 parent
5ad5fac
commit 7cdb62e
Showing
3 changed files
with
47 additions
and
13 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