-
Notifications
You must be signed in to change notification settings - Fork 57
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: add onDisconnect callback to subscription #2684
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2684 +/- ##
==========================================
+ Coverage 92.29% 92.33% +0.04%
==========================================
Files 76 76
Lines 2479 2492 +13
Branches 643 646 +3
==========================================
+ Hits 2288 2301 +13
Misses 144 144
Partials 47 47
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Fixes: #398
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.
Generally, looks good to me, though I changed the PR title and description according to my understanding of the changes in this PR.
I requested review from @platosha.
Looks good overall. Please address the red build. |
Quality Gate passedIssues Measures |
This ticket/PR has been released with Hilla 24.5.0.alpha12 and is also targeting the upcoming stable 24.5.0 version. |
The onDisconnect callback is called on reconnect.
This allows the Flux Connection to call the registered onDisconnect callbacks on reconnect.
If the state is already
RECONNECTING
, subsequent calls toonReconnect
will not trigger calling theonDisconnect
callbacks multiple times.Fixes: #398
Also as long-polling has issues with flux connections only websocket connection is supported.
Long polling can still be enabled by passing atmosphere options from Connect.ts