Commit c9dce0bf authored by Marius van der Wijden's avatar Marius van der Wijden Committed by Felix Lange

p2p/enode: remove data race in sliceIter (#20421)

parent e78f631d
......@@ -88,6 +88,8 @@ func (it *sliceIter) Next() bool {
}
func (it *sliceIter) Node() *Node {
it.mu.Lock()
defer it.mu.Unlock()
if len(it.nodes) == 0 {
return nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment