Skip to content

Unit test for reproduction of issue scenario #6515 #6644

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

Closed
wants to merge 1 commit into from

Conversation

cayres
Copy link

@cayres cayres commented Nov 27, 2024

This PR contains:

Unit test for reproduction of issue scenario #6515

Describe the problem you have without this PR

Today there is no error or event published when a client loses its websocket connection. Then we can't know and try to fix the problem, and that user doesn't get live updates anymore.

@pubkey
Copy link
Owner

pubkey commented Nov 28, 2024

I understand the use case.
I think this is more like feature request then a bug report.
Please make a PR if you need that feature.

@brunovinicius
Copy link

Hey Daniel! Thanks for the update. I think you are correct in that adding this event as something that we can use to react its a feature, yes. But I feel the behavior on the RxDB side is still kinda broken, I would argue.

You see, from RxDB perspective, if the websocket connection fails or gets dropped, a new one is created to re-stablish communication. I would argue this scenario is one that should cause the same behavior as when a GraphQL subscription gets dropped.

@pubkey
Copy link
Owner

pubkey commented Nov 28, 2024

Dropped subscriptions that reconnect could lead to missed events on the client that happen during this time. Please consider that case when implementing.

@cayres
Copy link
Author

cayres commented Dec 5, 2024

Hi Daniel, I have started coding this feature and realized that this was solved in the PR #6598. With the exposed wsoptions it is possible to listen to the closed events and reconnect. So I think this issue can be closed.

@cayres cayres closed this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants