diff options
author | =Corey Hulen <corey@hulen.com> | 2015-10-20 14:49:42 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-10-20 14:49:42 -0700 |
commit | 1fc12dd8ba2238eba7d154eee55e1381e7415372 (patch) | |
tree | df92c9501d91b29801c87d38e7d0a0ec234bbcee /web/react/stores | |
parent | fa3a0df2b63d3f1bbbad44bf20afa48fed42aa06 (diff) | |
download | chat-1fc12dd8ba2238eba7d154eee55e1381e7415372.tar.gz chat-1fc12dd8ba2238eba7d154eee55e1381e7415372.tar.bz2 chat-1fc12dd8ba2238eba7d154eee55e1381e7415372.zip |
Multi-session login
Diffstat (limited to 'web/react/stores')
-rw-r--r-- | web/react/stores/socket_store.jsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx index 77951f214..33cdc79fb 100644 --- a/web/react/stores/socket_store.jsx +++ b/web/react/stores/socket_store.jsx @@ -38,6 +38,10 @@ class SocketStoreClass extends EventEmitter { return; } + if (!global.window.mm_session_token_index) { + return; + } + this.setMaxListeners(0); if (window.WebSocket && !conn) { @@ -45,7 +49,9 @@ class SocketStoreClass extends EventEmitter { if (window.location.protocol === 'https:') { protocol = 'wss://'; } - var connUrl = protocol + location.host + '/api/v1/websocket'; + + var connUrl = protocol + location.host + '/api/v1/websocket?' + Utils.getSessionIndex(); + if (this.failCount === 0) { console.log('websocket connecting to ' + connUrl); //eslint-disable-line no-console } |