go: Add more debug info

master
Luther Wen Xu 2019-10-15 22:58:58 +07:00
parent 0477b55885
commit b7625cd6ac
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 2 additions and 0 deletions

@ -27,6 +27,8 @@ func handleIncomingMessage(who *websocket.Conn, msg string) {
return return
} }
if !connectedUsers[message[1]] { if !connectedUsers[message[1]] {
fmt.Println(message[1], "tried to connect. Disconnecting!")
fmt.Println(connectedUsers)
who.WriteMessage(websocket.TextMessage, []byte("leave "+message[1])) who.WriteMessage(websocket.TextMessage, []byte("leave "+message[1]))
} }
default: default: