bridge: log code and reason in close handler

This commit is contained in:
hippoz 2022-10-30 23:02:40 +02:00
parent d63933f06c
commit 09ecdf6cda
Signed by: hippoz
GPG key ID: 7C52899193467641

View file

@ -118,7 +118,7 @@ export default class {
this.dispatch(payload.t, payload.d); this.dispatch(payload.t, payload.d);
}; };
this.ws.onclose = ({ code }) => { this.ws.onclose = ({ code, reason }) => {
this.authenticated = false; this.authenticated = false;
this.user = null; this.user = null;
this.channels = null; this.channels = null;
@ -145,7 +145,7 @@ export default class {
this.dispatch(GatewayEventType.Close, code); this.dispatch(GatewayEventType.Close, code);
log("close"); log("close", code, reason);
}; };
this.ws.onerror = (e) => { this.ws.onerror = (e) => {
log("websocket: onerror", e); log("websocket: onerror", e);