From 83f71df0297bd4f7f95f59691c2eb0ce494741a4 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 11 Mar 2024 17:51:00 -0400 Subject: [PATCH] fix: use Lock --- net/ws.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ws.go b/net/ws.go index 3a2d4eb..8a9349b 100644 --- a/net/ws.go +++ b/net/ws.go @@ -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 }