summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-07-27 09:54:43 -0400
committerChristopher Speller <crspeller@gmail.com>2016-07-27 09:54:42 -0400
commitfc7ae6ba65185719591d89a1be84fb3f9804943b (patch)
treed65c9338bca8502d884e982830747ad01cefb49c /webapp/components
parent199c55b5662789e27858a2da9461d4e2ea6026c5 (diff)
downloadchat-fc7ae6ba65185719591d89a1be84fb3f9804943b.tar.gz
chat-fc7ae6ba65185719591d89a1be84fb3f9804943b.tar.bz2
chat-fc7ae6ba65185719591d89a1be84fb3f9804943b.zip
Initialize and close WebSocket more accurately and consistently (#3683)
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/logged_in.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/webapp/components/logged_in.jsx b/webapp/components/logged_in.jsx
index 14b7e138b..ea9df3692 100644
--- a/webapp/components/logged_in.jsx
+++ b/webapp/components/logged_in.jsx
@@ -25,9 +25,6 @@ export default class LoggedIn extends React.Component {
this.onUserChanged = this.onUserChanged.bind(this);
this.setupUser = this.setupUser.bind(this);
- // Initalize websocket
- WebSocketActions.initialize();
-
// Force logout of all tabs if one tab is logged out
$(window).bind('storage', (e) => {
// when one tab on a browser logs out, it sets __logout__ in localStorage to trigger other tabs to log out
@@ -105,6 +102,9 @@ export default class LoggedIn extends React.Component {
}
componentDidMount() {
+ // Initalize websocket
+ WebSocketActions.initialize();
+
// Listen for user
UserStore.addChangeListener(this.onUserChanged);