diff --git a/build b/build index a4c1b5a..945d9fc 100755 --- a/build +++ b/build @@ -1,8 +1,8 @@ #!/usr/bin/env bash SHA=$(git rev-parse --short=7 HEAD) -docker build -t yardstick/micro-services:braid-$SHA . -docker push yardstick/micro-services:braid-$SHA +docker build -t yardstick/braid-$SHA . +docker push yardstick/braid-$SHA -echo "Your new docker tag: yardstick/micro-services:braid-$SHA" +echo "Your new docker tag: yardstick/braid-$SHA" diff --git a/src/clients/clientBase.ts b/src/clients/clientBase.ts index 8b160bd..8e6df4f 100644 --- a/src/clients/clientBase.ts +++ b/src/clients/clientBase.ts @@ -38,6 +38,17 @@ class ClientBase { channel.broadcastMessage(this, message); logger.accessLog.info(`broadcast complete on channel ${channel.id}: `, {message: message}); }); + + this.ws.on('close', (reasonCode: string, description: string) => { + logger.accessLog.info(`closing connection for client ${this.id}`); + + if (this.channel) { + this.channel.removeClient(this.id); + } + + // server.clientManager.removeClient(this.id); + logger.accessLog.info(`closed connection for client ${this.id}`); + }); } replaceWebSocket(ws: WebSocket) {