Include session id in WebSocket Connection
banisadr opened this issue · comments
Enables: foxglove/community#354
Including sessionId
sent by server on opening connection allows client to understand context and if the connection is a re-connection from a dropped context, or if it is a new session connecting. We will then be able to clear state in the client when connecting to a new context, but retain state when reconnecting a dropped connection.
Context: Customer is currently reconnecting to a websocket in a different context and the state is being preserved leading to incorrect results. They would like the state to be cleared when reconnecting to the WS in a new context.
Very interested in this for our use case as well. We do a large amount of simulation runs over websocket, and currently there's no guarantee that old messages are cleared, resulting in some errors while visualizing data. Being able to fully clear the state when a new server connects would make this much easier.