From bb4a8e659c2a5abd32a44754448514dc4af6d264 Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Sun, 29 Nov 2020 20:58:07 +0800 Subject: [PATCH] fix lock. --- client/decoders.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/decoders.go b/client/decoders.go index 1455c96b..2e2b6aaa 100644 --- a/client/decoders.go +++ b/client/decoders.go @@ -796,6 +796,8 @@ func decodeOnlinePushReqPacket(c *QQClient, seq uint16, payload []byte) (interfa } if s44.GroupSyncMsg != nil { func() { + groupJoinLock.Lock() + defer groupJoinLock.Unlock() if s44.GroupSyncMsg.GetMsgType() == 3 && s44.GroupSyncMsg.GetGrpCode() != 0 { // member sync c.Debug("syncing members.") if group := c.FindGroup(s44.GroupSyncMsg.GetGrpCode()); group != nil { @@ -819,8 +821,6 @@ func decodeOnlinePushReqPacket(c *QQClient, seq uint16, payload []byte) (interfa } return } - groupJoinLock.Lock() - defer groupJoinLock.Unlock() c.Debug("syncing groups.") old := c.GroupList any := func(code int64) bool {