From 188565381586681dafdc0a6a034e1ddfe49ef93f Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Thu, 14 Apr 2022 22:08:08 +0300 Subject: [PATCH] frontend: add basic gateway debug messages --- frontend/src/gateway.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/gateway.js b/frontend/src/gateway.js index 9a1929c..7a678d1 100644 --- a/frontend/src/gateway.js +++ b/frontend/src/gateway.js @@ -33,6 +33,7 @@ export default { if (this.reconnectTimeout) { clearTimeout(this.reconnectTimeout); } + console.log("[gateway] open"); }; this.ws.onmessage = (event) => { const payload = JSON.parse(event.data); @@ -50,6 +51,8 @@ export default { d: 0 }); }, payload.d.pingInterval); + + console.log("[gateway] hello"); break; } case GatewayPayloadType.Ready: { @@ -57,6 +60,8 @@ export default { this.channels = payload.d.channels; this.reconnectDelay = 400; + + console.log("[gateway] ready"); break; } } @@ -74,6 +79,8 @@ export default { this.reconnectTimeout = setTimeout(() => { this.init(); }, this.reconnectDelay); + + console.log("[gateway] close"); }; return true;