File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
services/static-webserver/client/source/class/osparc/utils Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1033,11 +1033,13 @@ qx.Class.define("osparc.utils.Utils", {
10331033 // Function that creates a unique tabId even for duplicated tabs
10341034 getClientSessionID : function ( ) {
10351035 const getUniqueSessionId = ( ) => {
1036- const uuid = osparc . utils . Utils . uuidV4 ( ) ;
1036+ // before creating a new one, check if the websocket has it set
1037+ const webSocket = osparc . wrapper . WebSocket . getInstance ( ) . getSocket ( ) ;
1038+ const clientSessionId = webSocket ? webSocket . io . engine . opts . query [ "client_session_id" ] : osparc . utils . Utils . uuidV4 ( ) ;
10371039 // Set window.name. This property is persistent on window reloads, but it doesn't get copied in a duplicated tab
1038- window . name = uuid ;
1039- sessionStorage . setItem ( "clientsessionid" , uuid ) ;
1040- return uuid ;
1040+ window . name = clientSessionId ;
1041+ sessionStorage . setItem ( "clientsessionid" , clientSessionId ) ;
1042+ return clientSessionId ;
10411043 } ;
10421044
10431045 let uniqueSessionId = sessionStorage . getItem ( "clientsessionid" ) ;
You canāt perform that action at this time.
0 commit comments