Skip to content

Commit

Permalink
bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrs4s committed Aug 1, 2020
1 parent 901905b commit 23ff9b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/decoders.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/Mrs4s/MiraiGo/client/pb/structmsg"
"github.com/Mrs4s/MiraiGo/utils"
"github.com/golang/protobuf/proto"
"math"
"sync"
"sync/atomic"
"time"
Expand Down Expand Up @@ -229,7 +230,7 @@ func decodeMessageSvcPacket(c *QQClient, _ uint16, payload []byte) (interface{},
continue
}
if c.lastMessageSeq >= message.Head.MsgSeq {
if c.lastMessageSeq-message.Head.MsgSeq < 1000 {
if math.Abs(float64(c.lastMessageSeq-message.Head.MsgSeq)) < 1000 {
continue
}
}
Expand Down

0 comments on commit 23ff9b7

Please sign in to comment.