Compare commits
2 commits
26ca4d8b93
...
d256235c1b
Author | SHA1 | Date | |
---|---|---|---|
d256235c1b | |||
13d7cd0919 |
3 changed files with 3 additions and 3 deletions
|
@ -1,3 +1,3 @@
|
|||
package metadata
|
||||
|
||||
const GoTomatoVersion = "v0.0.1" // The GoTomato Version
|
||||
const GoTomatoVersion = "v0.0.2" // The GoTomato Version
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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…
Reference in a new issue