|
|
@@ -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
|
|
|
}
|
|
|
}
|