From 09ecdf6cdad4c733fb6530c248421e7ceab0378b Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Sun, 30 Oct 2022 23:02:40 +0200 Subject: [PATCH] bridge: log code and reason in close handler --- discord-waffle-bridge/src/WaffleClient.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord-waffle-bridge/src/WaffleClient.js b/discord-waffle-bridge/src/WaffleClient.js index ddeaf43..ab7ccf5 100644 --- a/discord-waffle-bridge/src/WaffleClient.js +++ b/discord-waffle-bridge/src/WaffleClient.js @@ -118,7 +118,7 @@ export default class { this.dispatch(payload.t, payload.d); }; - this.ws.onclose = ({ code }) => { + this.ws.onclose = ({ code, reason }) => { this.authenticated = false; this.user = null; this.channels = null; @@ -145,7 +145,7 @@ export default class { this.dispatch(GatewayEventType.Close, code); - log("close"); + log("close", code, reason); }; this.ws.onerror = (e) => { log("websocket: onerror", e);