From b1cab163157f03f35932cafd2b6fce257a3eb15b Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Wed, 8 Mar 2023 18:27:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9E=E5=87=BB=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=B7=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gateway/agent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index 4fbf3f03b..59f93fda8 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -99,7 +99,7 @@ locp: key := msg.MainType + msg.SubType // 加锁 if v, ok := this.protoMsg[key]; ok { - if v != 0 && configure.Now().Unix()-v < 2 { + if v != 0 && configure.Now().UnixMilli() -v < 1 { // 返回错误码 this.protoMsg[key] = configure.Now().Unix() data, _ := anypb.New(&pb.NotifyErrorNotifyPush{ @@ -115,7 +115,7 @@ locp: continue } } - this.protoMsg[key] = configure.Now().Unix() + this.protoMsg[key] = configure.Now().UnixMilli() if err := this.messageDistribution(msg); err != nil { this.gateway.Errorf("messageDistribution err:%v", err)