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
|
@ -27,7 +27,7 @@ func HandleConnections(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
defer ws.Close()
|
||||
|
||||
log.Printf("Client connected from %v", ws.NetConn().RemoteAddr())
|
||||
log.Printf("Client connected from %v (total: %d)", ws.NetConn().RemoteAddr(), len(Clients)+1)
|
||||
|
||||
// Register the new client
|
||||
mu.Lock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue