1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

fix lock.

This commit is contained in:
Mrs4s 2020-11-29 20:58:07 +08:00
parent 76317b3853
commit bb4a8e659c

View File

@ -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 {