mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-04 05:58:40 +00:00
p2p/discover: waitForNodes hangs on RespCount=0 from peer (#35043)
The first NODES response sets total = min(int(response.RespCount), totalNodesResponseLimit), With RespCount=0, total=0 but receive become 1; receive == count is never satisfied.
This commit is contained in:
parent
ca1a027fae
commit
9429725d2d
1 changed files with 1 additions and 1 deletions
|
|
@ -464,7 +464,7 @@ func (t *UDPv5) waitForNodes(c *callV5, distances []uint) ([]*enode.Node, error)
|
|||
if total == -1 {
|
||||
total = min(int(response.RespCount), totalNodesResponseLimit)
|
||||
}
|
||||
if received++; received == total {
|
||||
if received++; received >= total {
|
||||
return nodes, nil
|
||||
}
|
||||
case err := <-c.err:
|
||||
|
|
|
|||
Loading…
Reference in a new issue