mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-03-21 17:44:58 -05:00
QR2: Check if session is deleted in sendChallenge
Some checks failed
Build CI / build (push) Has been cancelled
Some checks failed
Build CI / build (push) Has been cancelled
This commit is contained in:
parent
79167423b9
commit
0b10738c16
|
|
@ -33,7 +33,12 @@ func sendChallenge(conn net.PacketConn, addr net.UDPAddr, session Session, looku
|
|||
|
||||
challenge = common.RandomString(6) + "00" + hexIP + hexPort
|
||||
mutex.Lock()
|
||||
sessions[lookupAddr].Challenge = challenge
|
||||
if sessionPtr := sessions[lookupAddr]; sessionPtr != nil {
|
||||
sessionPtr.Challenge = challenge
|
||||
} else {
|
||||
mutex.Unlock()
|
||||
return
|
||||
}
|
||||
mutex.Unlock()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user