feat: add number of connected clients to log output
This commit is contained in:
parent
26ca4d8b93
commit
13d7cd0919
2 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ func handleClientCommands(ws *websocket.Conn) {
|
|||
|
||||
_, message, err := ws.ReadMessage()
|
||||
if err != nil {
|
||||
log.Printf("Client disconnected from %s (%v)", ws.NetConn().RemoteAddr(), err)
|
||||
log.Printf("Client disconnected from %s (%v) (total: %d)", ws.NetConn().RemoteAddr(), err, len(Clients)-1)
|
||||
delete(Clients, ws)
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue