~emersion/gamja

6430fa252aaf13a18c7720f8f4ddde91d0fdf7bc — Simon Ser a month ago aa79067
lib/client: log close code
1 files changed, 3 insertions(+), 2 deletions(-)

M lib/client.js
M lib/client.js => lib/client.js +3 -2
@@ 70,8 70,9 @@ export default class Client extends EventTarget {
		this.ws.addEventListener("open", this.handleOpen.bind(this));
		this.ws.addEventListener("message", this.handleMessage.bind(this));

		this.ws.addEventListener("close", () => {
			console.log("Connection closed");
		this.ws.addEventListener("close", (event) => {
			console.log("Connection closed (code: " + event.code + ")");

			this.ws = null;
			this.setStatus(Client.Status.DISCONNECTED);
			this.availableCaps = {};