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?