diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-12-29 15:48:46 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-12-29 15:48:46 -0500 |
commit | 20b995442488f321cebad064d2488fdcf4c62899 (patch) | |
tree | 5fa9235cc78cbfab9809ea8eee764557de1bc6fe /webapp/actions/websocket_actions.jsx | |
parent | 5811acca7fb654cfc4d9fa979873774294c7166d (diff) | |
download | chat-20b995442488f321cebad064d2488fdcf4c62899.tar.gz chat-20b995442488f321cebad064d2488fdcf4c62899.tar.bz2 chat-20b995442488f321cebad064d2488fdcf4c62899.zip |
Fix console errors when logging out (#4915)
Diffstat (limited to 'webapp/actions/websocket_actions.jsx')
-rw-r--r-- | webapp/actions/websocket_actions.jsx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx index d03025efb..9a52eb05c 100644 --- a/webapp/actions/websocket_actions.jsx +++ b/webapp/actions/websocket_actions.jsx @@ -59,7 +59,6 @@ export function initialize() { WebSocketClient.setEventCallback(handleEvent); WebSocketClient.setFirstConnectCallback(handleFirstConnect); - WebSocketClient.setReconnectCallback(handleReconnect); WebSocketClient.setCloseCallback(handleClose); WebSocketClient.initialize(connUrl); } @@ -71,21 +70,18 @@ export function close() { export function reconnect() { close(); initialize(); - handleReconnect(); -} - -function handleFirstConnect() { - ErrorStore.clearLastError(); - ErrorStore.emitChange(); -} -function handleReconnect() { if (Client.teamId) { loadChannelsForCurrentUser(); loadPosts(ChannelStore.getCurrentId()); + StatusActions.loadStatusesForChannelAndSidebar(); } - StatusActions.loadStatusesForChannelAndSidebar(); + ErrorStore.clearLastError(); + ErrorStore.emitChange(); +} + +function handleFirstConnect() { ErrorStore.clearLastError(); ErrorStore.emitChange(); } |