0

I have a problem handling websocket connections in my application. In principle, my application is designed to open a single channel per user-open session. Several people can share user, so several sessions can be created depending on each one. But the problem comes when a session (browser) has several tabs open and in one of them, for some reason, is closed and opens a new websocket connection (Note: this should not happen and I have not yet very clear why this situation, I'm trying this solution).

The thing is that when the websocket reconnects, it loses certain subscriptions that the previous one already had, causing problems of misalignment between the different tabs.

  • Is there any way to "save" the subscriptions that are being made along the way so that in the event that the websocket has to be reconnected, it subscribes to them?

  • Is it normal that different websockets in different tabs share the same session ID?

Translated with www.DeepL.com/Translator (free version)

Illidan
  • 57
  • 7
  • 1
    There's nothing wrong with what you're doing conceptually, so I can't imagine a conceptual answer will be very helpful. If you can create a minimal example (in code) that demonstrates your problem, it'll certainly be easy to answer this. – Mrk Sef Sep 27 '21 at 17:18

0 Answers0