diff options
Diffstat (limited to 'p2p/discover/udp.go')
-rw-r--r-- | p2p/discover/udp.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/p2p/discover/udp.go b/p2p/discover/udp.go index ab3559ad8..2b215b45c 100644 --- a/p2p/discover/udp.go +++ b/p2p/discover/udp.go @@ -510,9 +510,15 @@ func (req *findnode) handle(t *udp, from *net.UDPAddr, fromID NodeID, mac []byte closestrpc[i] = nodeToRPC(n) } t.send(from, neighborsPacket, neighbors{ - Nodes: closestrpc, + Nodes: closestrpc[:13], Expiration: uint64(time.Now().Add(expiration).Unix()), }) + if len(closestrpc) > 13 { + t.send(from, neighborsPacket, neighbors{ + Nodes: closestrpc[13:], + Expiration: uint64(time.Now().Add(expiration).Unix()), + }) + } return nil } |