mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
lib/client: log close code
This commit is contained in:
parent
aa79067179
commit
6430fa252a
1 changed files with 3 additions and 2 deletions
|
@ -70,8 +70,9 @@ export default class Client extends EventTarget {
|
||||||
this.ws.addEventListener("open", this.handleOpen.bind(this));
|
this.ws.addEventListener("open", this.handleOpen.bind(this));
|
||||||
this.ws.addEventListener("message", this.handleMessage.bind(this));
|
this.ws.addEventListener("message", this.handleMessage.bind(this));
|
||||||
|
|
||||||
this.ws.addEventListener("close", () => {
|
this.ws.addEventListener("close", (event) => {
|
||||||
console.log("Connection closed");
|
console.log("Connection closed (code: " + event.code + ")");
|
||||||
|
|
||||||
this.ws = null;
|
this.ws = null;
|
||||||
this.setStatus(Client.Status.DISCONNECTED);
|
this.setStatus(Client.Status.DISCONNECTED);
|
||||||
this.availableCaps = {};
|
this.availableCaps = {};
|
||||||
|
|
Loading…
Reference in a new issue