From dcdcc6455393dd94c7007892fa3406b9b889ddb5 Mon Sep 17 00:00:00 2001 From: hippoz Date: Mon, 16 Nov 2020 21:35:38 +0200 Subject: [PATCH] forgot to check for inactivity before disconnecting --- api/v1/gateway/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/api/v1/gateway/index.js b/api/v1/gateway/index.js index f7263cf..f043a7c 100644 --- a/api/v1/gateway/index.js +++ b/api/v1/gateway/index.js @@ -26,6 +26,7 @@ GatewayServer.prototype.eventSetup = function() { socket.isConnected = false; setTimeout(() => { + if (socket.isConnected) return; console.log('[*] [gateway] User still not connected after timeout, removing...'); socket.disconnect(); socket.disconnect(true);