This commit is contained in:
2025-01-08 14:44:36 +08:00
parent a467e69f7b
commit 6df2990e9e

View File

@@ -191,11 +191,11 @@ func (h *TCPHandler) HandleClient(conn net.Conn) {
}
broadcastMessage(message)
case "db":
//if !client.IsAuth {
// fmt.Printf("来自未授权客户端的消息 %s\n", conn.RemoteAddr())
// conn.Close()
// return
//}
if !client.IsAuth {
fmt.Printf("来自未授权客户端的消息 %s\n", conn.RemoteAddr())
conn.Close()
return
}
if err := h.Server.Db(client, message); err != nil {
fmt.Printf("获取客户端音量分贝错误: %v\n", err)
continue