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)