From b7a2b9bbd74e77d5b856cc266ae8092e32791aae Mon Sep 17 00:00:00 2001 From: Mrs4s Date: Thu, 22 Apr 2021 20:23:49 +0800 Subject: [PATCH] fix cache time. --- client/c2c_processor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/c2c_processor.go b/client/c2c_processor.go index d6829592..e85b375a 100644 --- a/client/c2c_processor.go +++ b/client/c2c_processor.go @@ -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 }