-
Notifications
You must be signed in to change notification settings - Fork 86
feat!: reenable WS fallback #1889
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
Open
szuperaz
wants to merge
24
commits into
release-v10
Choose a base branch
from
add-back-ws-fallback
base: release-v10
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,846
−172
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
55636f4
fix(connection): stop a disconnected socket from connecting or settli…
szuperaz 96d8bbe
fix(client): keep the next user's token when disconnectUser's deferre…
szuperaz 4764d62
feat: reintroduce WS fallback
szuperaz 342a02f
fix: review fixes
szuperaz 3f8a4d6
refactor: move WSFallback connect to WSConnection
szuperaz a5fbba1
refactor: use generated longPoll endpoint
szuperaz 54aa92b
fix: review fixes
szuperaz e2f8d90
fix: empty token fallback
szuperaz a937e3c
refactor: remove unnecessary comments
szuperaz fc444ad
refactor: remove more comments
szuperaz f2d38f8
fix: wait for token in api client
szuperaz 391cb41
refactor: move WSFallback class to wsConnection folder
szuperaz ef2196c
refactor: rename ConnectionState to WSFallbackConnectionState
szuperaz bd4dbc1
refactor: remove UR type
szuperaz f6e2d79
fix: mark methods as internal or private; move private methods to end…
szuperaz aa4560d
refactor: removed unused isHealthy getter
szuperaz 6a75c58
refactor: remove connectionID from WS fallback
szuperaz f0b8c3b
refactor: reword misplaced comment
szuperaz 5e55432
fix: set local state before notifying subscribers
szuperaz 93b9957
fix: small fix
szuperaz d14921e
refactor: rename isStatusDerivedFromSocket to usesDefaultWSConnection…
szuperaz 7fbf7fc
feat!: rename transport.changed to connection.fallback_activated
szuperaz 92e3035
docs: add warning for enableWSFallback option
szuperaz 9cc90c6
fix: remove isDisconnect fix
szuperaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why writing code for test purposes? Is there a purpose beyond fitting the test suite expectations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have the same thing for WS URL too: https://github.com/GetStream/stream-chat-js/blob/release-v10/src/client.ts#L516 - we need these swaps to run the SDK with a local backend. Both are existing concepts in
mastertoo.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyways looks smelly to hard-code this stuff. I think this belongs to the config service rather than hard-code some ports in the SDK code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we can do that, but then you have config params just for testing with local backend, because integrators would never need to set this. In any case, I don't think this PR is related. We can track it in Linear if we want to, but I don't think we should fix it here.