frontend: add basic gateway debug messages

This commit is contained in:
hippoz 2022-04-14 22:08:08 +03:00
parent fdbf6c9839
commit 1885653815
Signed by: hippoz
GPG key ID: 7C52899193467641

View file

@ -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;