1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00
This commit is contained in:
Mrs4s 2020-08-01 08:05:26 +08:00
parent 901905bef5
commit 23ff9b7269

View File

@ -13,6 +13,7 @@ import (
"github.com/Mrs4s/MiraiGo/client/pb/structmsg" "github.com/Mrs4s/MiraiGo/client/pb/structmsg"
"github.com/Mrs4s/MiraiGo/utils" "github.com/Mrs4s/MiraiGo/utils"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"math"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
@ -229,7 +230,7 @@ func decodeMessageSvcPacket(c *QQClient, _ uint16, payload []byte) (interface{},
continue continue
} }
if c.lastMessageSeq >= message.Head.MsgSeq { if c.lastMessageSeq >= message.Head.MsgSeq {
if c.lastMessageSeq-message.Head.MsgSeq < 1000 { if math.Abs(float64(c.lastMessageSeq-message.Head.MsgSeq)) < 1000 {
continue continue
} }
} }