mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p/enode: fixed data race in test
fixes a data race between genIter.Next() and genIter.Close()
This commit is contained in:
parent
7aff4d1e31
commit
090d7b0bdc
1 changed files with 1 additions and 1 deletions
|
|
@ -268,7 +268,7 @@ func (s *genIter) Node() *Node {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *genIter) Close() {
|
func (s *genIter) Close() {
|
||||||
s.index = ^uint32(0)
|
atomic.StoreUint32(&s.index, ^uint32(0))
|
||||||
}
|
}
|
||||||
|
|
||||||
func testNode(id, seq uint64) *Node {
|
func testNode(id, seq uint64) *Node {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue