From b7625cd6ac2c4d99729ca0b03374b0ca64bf4fc1 Mon Sep 17 00:00:00 2001 From: Luther Wen Xu Date: Tue, 15 Oct 2019 22:58:58 +0800 Subject: [PATCH] go: Add more debug info --- GoBot/server/hub.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GoBot/server/hub.go b/GoBot/server/hub.go index c1b3e77..0466861 100644 --- a/GoBot/server/hub.go +++ b/GoBot/server/hub.go @@ -27,6 +27,8 @@ func handleIncomingMessage(who *websocket.Conn, msg string) { return } if !connectedUsers[message[1]] { + fmt.Println(message[1], "tried to connect. Disconnecting!") + fmt.Println(connectedUsers) who.WriteMessage(websocket.TextMessage, []byte("leave "+message[1])) } default: