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

pull/20430/head^2
Marius van der Wijden 5 years ago committed by Felix Lange
parent e78f631dfc
commit c9dce0bfd7
  1. 2
      p2p/enode/iter.go

@ -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
}

Loading…
Cancel
Save