From 6df2990e9e57f44ca23097aeb64b685844aa7825 Mon Sep 17 00:00:00 2001 From: iuu <2167162990@qq.com> Date: Wed, 8 Jan 2025 14:44:36 +0800 Subject: [PATCH] xx --- tcpserver/handler.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tcpserver/handler.go b/tcpserver/handler.go index 9e6052c..3a41692 100644 --- a/tcpserver/handler.go +++ b/tcpserver/handler.go @@ -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