Shapes Not Properly Unsubscribed on Logout or Session Termination #2274
gartz
started this conversation in
Bug reports
Replies: 1 comment 1 reply
-
|
Hey @gartz — have you see the electric/packages/typescript-client/src/client.ts Lines 281 to 293 in 4e9b9be You could e.g. have a shared |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Use Case
When a user logs out or their session is terminated, all shape subscriptions are expected to be unsubscribed.
Expected Behavior
Current Behavior
Implications
Proposed Solution
unsubscribeAll, immediately disconnect the shape.Recommended Approach
The best solution would be to send an abort signal to immediately stop pending long polling requests when unsubscribing.
A new subscription should be able to restart the shape synchronization with the backend as needed.
Beta Was this translation helpful? Give feedback.
All reactions