Skip to content

Commit 550f70c

Browse files
committed
Avoid recursively locking gpcm mutex
1 parent 4a8667d commit 550f70c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

gpcm/kick.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,15 @@ func KickPlayerCustomMessage(profileID uint32, reason string, message WWFCErrorM
131131

132132
for _, match := range findMatchingSessions(session) {
133133
pids = append(pids, match.User.ProfileId)
134+
135+
mutex.Unlock()
134136
match.replyError(gpError)
137+
mutex.Lock()
135138
}
136139

140+
mutex.Unlock()
137141
session.replyError(gpError)
142+
mutex.Lock()
138143
}
139144

140145
// After 3 seconds, send kick order to all players

0 commit comments

Comments
 (0)