修改连击时间差

This commit is contained in:
wh_zcy 2023-03-08 18:27:42 +08:00
parent 8b228a7cd0
commit b1cab16315

View File

@ -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)