From 0e4343267e00c82bbc5c054dd6c37597dfcae571 Mon Sep 17 00:00:00 2001 From: hujiebin Date: Fri, 18 Aug 2023 13:00:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E5=87=8F=E5=B0=91=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index 9ec20c9..e38683e 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,6 @@ import ( "net/url" "os" "strconv" - "strings" "time" "github.com/go-redis/redis/v8" @@ -216,10 +215,10 @@ func (s *server) Broadcast(ctx context.Context, in *userCenter.BroadcastMessage) } for addr, users := range m { //addr = strings.Replace(addr, "47.91.121.73", "172.26.95.24", -1) - mylogrus.MyLog.Infof("Broadcasting: Addr %s: %d users", addr, len(users)) - if !strings.Contains(addr, "172.26.95.48:50050") && !strings.Contains(addr, "172.26.95.24:50050") { - mylogrus.MyLog.Errorf("Broadcasting: Addr error %s: %d users", addr, len(users)) - } + //mylogrus.MyLog.Infof("Broadcasting: Addr %s: %d users", addr, len(users)) + //if !strings.Contains(addr, "172.26.95.48:50050") && !strings.Contains(addr, "172.26.95.24:50050") { + // mylogrus.MyLog.Errorf("Broadcasting: Addr error %s: %d users", addr, len(users)) + //} const sendBatchSize = 5 for i := 0; i < len(users); i += sendBatchSize { @@ -296,7 +295,7 @@ func (s *server) GetLastRoomHeartbeat(ctx context.Context, in *userCenter.GetLas } func realBroadcast(addr string, uids []uint64, msg *userCenter.BroadcastMessage) { - mylogrus.MyLog.Infof("Broadcasting: Addr %s: users: %v", addr, uids) + //mylogrus.MyLog.Infof("Broadcasting: Addr %s: users: %v", addr, uids) for _, uid := range uids { client := manager.UserProxyMgr.MakeClient(addr) -- 2.22.0