reid пре 2 година
родитељ
комит
52fc434660
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      auth/auth.go

+ 2 - 3
auth/auth.go

@@ -55,10 +55,9 @@ func WsIsAuthenticated(conn *websocket.Conn, token string) bool {
 func WsAuthCheck(conn *websocket.Conn) bool {
 	AuthenticatedClients.RLock()
 	defer AuthenticatedClients.RUnlock()
-	for _, con := range AuthenticatedClients.Conns {
-		fmt.Println(string(con)) //debug
+	for tokenID, con := range AuthenticatedClients.Conns {
 		if con == conn {
-			config.Logger.Info("Client in auth map")
+			config.Logger.Info("%s is in auth map",tokenID)
 			return true
 		}
 	}