frontend: add basic gateway debug messages
This commit is contained in:
parent
fdbf6c9839
commit
1885653815
1 changed files with 7 additions and 0 deletions
|
@ -33,6 +33,7 @@ export default {
|
||||||
if (this.reconnectTimeout) {
|
if (this.reconnectTimeout) {
|
||||||
clearTimeout(this.reconnectTimeout);
|
clearTimeout(this.reconnectTimeout);
|
||||||
}
|
}
|
||||||
|
console.log("[gateway] open");
|
||||||
};
|
};
|
||||||
this.ws.onmessage = (event) => {
|
this.ws.onmessage = (event) => {
|
||||||
const payload = JSON.parse(event.data);
|
const payload = JSON.parse(event.data);
|
||||||
|
@ -50,6 +51,8 @@ export default {
|
||||||
d: 0
|
d: 0
|
||||||
});
|
});
|
||||||
}, payload.d.pingInterval);
|
}, payload.d.pingInterval);
|
||||||
|
|
||||||
|
console.log("[gateway] hello");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GatewayPayloadType.Ready: {
|
case GatewayPayloadType.Ready: {
|
||||||
|
@ -57,6 +60,8 @@ export default {
|
||||||
this.channels = payload.d.channels;
|
this.channels = payload.d.channels;
|
||||||
|
|
||||||
this.reconnectDelay = 400;
|
this.reconnectDelay = 400;
|
||||||
|
|
||||||
|
console.log("[gateway] ready");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,6 +79,8 @@ export default {
|
||||||
this.reconnectTimeout = setTimeout(() => {
|
this.reconnectTimeout = setTimeout(() => {
|
||||||
this.init();
|
this.init();
|
||||||
}, this.reconnectDelay);
|
}, this.reconnectDelay);
|
||||||
|
|
||||||
|
console.log("[gateway] close");
|
||||||
};
|
};
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue