-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: no upgrade #1645
feat: no upgrade #1645
Conversation
1823fbe
to
606ffa6
Compare
606ffa6
to
4a8250d
Compare
4a8250d
to
3eb3704
Compare
3eb3704
to
36b2b97
Compare
36b2b97
to
6c5cc48
Compare
6c5cc48
to
bdf8750
Compare
@SimonWoolf I've addressed the feedback in #1645 (review) by setting the value of |
that's within a |
f3ffb80
to
63523db
Compare
@SimonWoolf Good point, I've made it so that |
@owenpearson just a heads up that depending on which PR gets merged first you might need to also update the migration guide (see #1670) |
63523db
to
b54bcf5
Compare
…ycle Fixes a regression introduced in ably-js v2 in the "no upgrade" PR [1]. Under certain network conditions (internet down) a race condition could occur in the connection manager. Specifically, websocket connectivity check in the `startWebSocketSlowTimer` function needed to set the `wsCheckResult` flag to `false` before the timer was cleared by other code branches. If that happened, it then caused an endless loop of websocket connection retries, even after the network conditions stabilized. A websocket transport would successfully open but then be immediately disposed due to the `wsCheckResult` flag still being set to `false`, without any mechanism to reset it in this scenario. Upon closer look, it makes sense that the websocket connection health flags (`wsCheckResult` and `abandonedWebSocket`) should be reset when attempting a new websocket connection. The previous solution did not explicitly reset these flags in the `connectWs` function, leading to the described race condition and endless loop. Thus, `wsCheckResult` and `abandonedWebSocket` are now reset to their neutral values upon entering the `connectWs` function. Resolves #1844 [1] #1645
Jira links:
removes XHRStreaming transport, replaces upgrade mechanism with a websocket + base fallback transport mechanism whereby no two transports may be simultaneously connected.