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

keepalive and reconnects #8

Open
wmertens opened this issue Jul 31, 2019 · 0 comments
Open

keepalive and reconnects #8

wmertens opened this issue Jul 31, 2019 · 0 comments

Comments

@wmertens
Copy link

wmertens commented Jul 31, 2019

  1. It leaks, because of the keepalive setInterval never being cancelled on socket close
  2. Why is the keepalive needed?
  3. Why do you close the subscription when the socket closes? When the browser reconnects, the subscription won't exist any more
  4. Perhaps the client should send a random token and that gets used for all subsequent connections, so that multiple subscription calls all happen on the same SSE stream
  5. Perhaps the subscribed queries should be stored with that client token, and then unsub all on connection drop + re-subscribe when the connection is re-established
  6. Or maybe the client needs to store all active queries, and when the SSE drops close it, and re-subscribe all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant