|
@@ -39,8 +39,8 @@ var (
|
|
|
// check if websocket session is in the auth map
|
|
// check if websocket session is in the auth map
|
|
|
func WsIsAuthenticated(conn *websocket.Conn) bool {
|
|
func WsIsAuthenticated(conn *websocket.Conn) bool {
|
|
|
AuthenticatedClients.Lock()
|
|
AuthenticatedClients.Lock()
|
|
|
|
|
+ defer AuthenticatedClients.Unlock()
|
|
|
_, exists := AuthenticatedClients.Conns[conn]
|
|
_, exists := AuthenticatedClients.Conns[conn]
|
|
|
- AuthenticatedClients.Unlock()
|
|
|
|
|
return exists
|
|
return exists
|
|
|
}
|
|
}
|
|
|
|
|
|