fix: add lock to GetChallenge

This commit is contained in:
Derrick Hammer 2024-03-11 17:48:27 -04:00
parent 7173abb54f
commit 605b6a6a09
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,8 @@ func (p *WebSocketPeer) SetChallenge(challenge []byte) {
}
func (p *WebSocketPeer) GetChallenge() []byte {
p.BasePeer.lock.RLock()
defer p.BasePeer.lock.RUnlock()
return p.challenge
}