From 0d8bb03b5773923cf52f4d8cb2711131caae105c Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Thu, 19 Jan 2017 09:58:38 -0500
Subject: Add functionality for refetching latest data after computer wakes up
 (#5120)

---
 webapp/actions/websocket_actions.jsx | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'webapp/actions/websocket_actions.jsx')

diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx
index 9a52eb05c..1a0ddda63 100644
--- a/webapp/actions/websocket_actions.jsx
+++ b/webapp/actions/websocket_actions.jsx
@@ -67,9 +67,15 @@ export function close() {
     WebSocketClient.close();
 }
 
-export function reconnect() {
+function reconnectWebSocket() {
     close();
     initialize();
+}
+
+export function reconnect(includeWebSocket = true) {
+    if (includeWebSocket) {
+        reconnectWebSocket();
+    }
 
     if (Client.teamId) {
         loadChannelsForCurrentUser();
-- 
cgit v1.2.3-1-g7c22

