fix: use Lock

This commit is contained in:
Derrick Hammer 2024-03-11 17:51:00 -04:00
parent fadbd7c37e
commit 83f71df029
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ func (p *WebSocketPeer) SetId(id *encoding.NodeId) {
}
func (p *WebSocketPeer) SetChallenge(challenge []byte) {
p.BasePeer.lock.RLock()
p.BasePeer.lock.Lock()
defer p.BasePeer.lock.Unlock()
p.challenge = challenge
}