diff options
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(); } |