From e8ce193cc0cbeb72fa434b4d91fd8425442cd541 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 3 Apr 2018 18:00:20 +0200 Subject: [PATCH] [lib.channel-controller] fix never closed() WebSocket --- webpack/lib/channel-controller.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webpack/lib/channel-controller.js b/webpack/lib/channel-controller.js index 4d6fb67..bbd326c 100644 --- a/webpack/lib/channel-controller.js +++ b/webpack/lib/channel-controller.js @@ -48,6 +48,7 @@ export default class ChannelController{ gs.get.room.fetch(); /* (6) Open channel websocket */ + ( window.csock != null ) && csock.close(); window.csock = new wscd(`wss://ws.douscord.xdrm.io/channel/${channel.id}`, { token: auth.token }); csock.bind(); csock.onreceive = (_dat) => {