mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-04-25 08:07:58 -05:00
QR2: Changes to help detect mutex deadlock
This commit is contained in:
parent
eac15559ac
commit
7b8352c17f
|
|
@ -220,7 +220,7 @@ func GetGroups(gameName string) []GroupInfo {
|
|||
groupInfo.MKWRegion = group.MKWRegion
|
||||
}
|
||||
|
||||
for session, _ := range group.Players {
|
||||
for session := range group.Players {
|
||||
mapData := map[string]string{}
|
||||
for k, v := range session.Data {
|
||||
mapData[k] = v
|
||||
|
|
|
|||
|
|
@ -90,10 +90,10 @@ func heartbeat(moduleName string, conn net.PacketConn, addr net.Addr, buffer []b
|
|||
if !session.Authenticated {
|
||||
logging.Notice(moduleName, "Sending challenge")
|
||||
sendChallenge(conn, addr, session, lookupAddr)
|
||||
return
|
||||
} else if !session.ExploitReceived && session.Login != nil && session.Login.NeedsExploit && statechanged == "1" {
|
||||
logging.Notice(moduleName, "Sending SBCM exploit to DNS patcher client")
|
||||
sendClientExploit(moduleName, session)
|
||||
return
|
||||
}
|
||||
|
||||
logging.Info(moduleName, "Heartbeat ok")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ func sendClientExploit(moduleName string, sessionCopy Session) {
|
|||
mutex.Lock()
|
||||
session, sessionExists := sessions[makeLookupAddr(sessionCopy.Addr.String())]
|
||||
if !sessionExists {
|
||||
mutex.Unlock()
|
||||
logging.Error(moduleName, "Session not found")
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user