mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
fix cache time.
This commit is contained in:
parent
f2de387430
commit
b7a2b9bbd7
@ -93,11 +93,11 @@ func (c *QQClient) c2cMessageSyncProcessor(rsp *msg.GetMessageResponse, info *in
|
||||
|
||||
func (c *QQClient) commMsgProcessor(pMsg *msg.Message, info *incomingPacketInfo) {
|
||||
strKey := fmt.Sprintf("%d%d%d%d", pMsg.Head.GetFromUin(), pMsg.Head.GetToUin(), pMsg.Head.GetMsgSeq(), pMsg.Head.GetMsgUid())
|
||||
if _, ok := c.msgSvcCache.GetAndUpdate(strKey, time.Minute*5); ok {
|
||||
if _, ok := c.msgSvcCache.GetAndUpdate(strKey, time.Hour*5); ok {
|
||||
c.Debug("c2c msg %v already exists in cache. skip.", pMsg.Head.GetMsgUid())
|
||||
return
|
||||
}
|
||||
c.msgSvcCache.Add(strKey, "", time.Minute*5)
|
||||
c.msgSvcCache.Add(strKey, "", time.Hour*5)
|
||||
if info.Params.bool("init") {
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user