fix: use Lock
This commit is contained in:
parent
fadbd7c37e
commit
83f71df029
|
@ -136,7 +136,7 @@ func (p *WebSocketPeer) SetId(id *encoding.NodeId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *WebSocketPeer) SetChallenge(challenge []byte) {
|
func (p *WebSocketPeer) SetChallenge(challenge []byte) {
|
||||||
p.BasePeer.lock.RLock()
|
p.BasePeer.lock.Lock()
|
||||||
defer p.BasePeer.lock.Unlock()
|
defer p.BasePeer.lock.Unlock()
|
||||||
p.challenge = challenge
|
p.challenge = challenge
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue