From e618c6ffb0b974156b89f3e54737e738e94b12b3 Mon Sep 17 00:00:00 2001 From: slice Date: Sun, 10 Mar 2019 11:23:27 -0700 Subject: Only connect to chat when authenticating in the first place To avoid duplication of the connection, the chat socket is destroyed upon logging out. --- src/modules/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/api.js') diff --git a/src/modules/api.js b/src/modules/api.js index dc5278f8..31cb55c6 100644 --- a/src/modules/api.js +++ b/src/modules/api.js @@ -50,7 +50,7 @@ const api = { }, initializeSocket (store) { // Set up websocket connection - if (!store.state.chatDisabled && store.state.wsToken) { + if (!store.state.chatDisabled) { const token = store.state.wsToken const socket = new Socket('/socket', {params: {token}}) socket.connect() -- cgit v1.2.3-70-g09d2