diff --git a/net/ws.go b/net/ws.go index cc5b10a..695ab25 100644 --- a/net/ws.go +++ b/net/ws.go @@ -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 }