subscriptions-transport-sse icon indicating copy to clipboard operation
subscriptions-transport-sse copied to clipboard

keepalive and reconnects

Open wmertens opened this issue 6 years ago • 0 comments

  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

wmertens avatar Jul 31 '19 13:07 wmertens