Skip to content
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

[push] client tries to reconnect to a Flux that no longer exists #2716

Closed
cromoteca opened this issue Sep 10, 2024 · 1 comment · Fixed by #2737
Closed

[push] client tries to reconnect to a Flux that no longer exists #2716

cromoteca opened this issue Sep 10, 2024 · 1 comment · Fixed by #2737
Assignees
Labels
bug Something isn't working hilla Issues related to Hilla investigation

Comments

@cromoteca
Copy link
Contributor

Describe the bug

#2684 introduced support for reconnection, but if the underlying Flux is no longer active, that reconnection keeps trying indefinitely.

That can happen, for example, after server timeout (ApplicationConfig.WEBSOCKET_IDLETIME in the Atmosphere servlet configuration).

Expected-behavior

When the Flux is no longer there, the retry should stop at the first attempt and the API should give the developer an option to reconnect. There's no universal logic for that: only the developer knows what to do in that case.

Reproduction

Configuring a short idle time (it's in milliseconds) allows to test that case easily.

System Info

Hilla 24.5.alpha13

@cromoteca cromoteca added bug Something isn't working hilla Issues related to Hilla labels Sep 10, 2024
@Legioth
Copy link
Member

Legioth commented Sep 10, 2024

There's no universal logic for that: only the developer knows what to do in that case.

In other words, it should trigger the onDisconnect callback that was introduced in #2684.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hilla Issues related to Hilla investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants