forked from premiere/premiere-libtorrent
Only re-bootstrap when there is no enough nodes in routing table.
This commit is contained in:
parent
d3d15297f5
commit
20708fa5b6
|
@ -508,8 +508,10 @@ void node::tick()
|
|||
{
|
||||
// every now and then we refresh our own ID, just to keep
|
||||
// expanding the routing table buckets closer to us.
|
||||
// if m_table.depth() < 4, means routing_table doesn't
|
||||
// have enough nodes.
|
||||
time_point now = aux::time_now();
|
||||
if (m_last_self_refresh + minutes(10) < now)
|
||||
if (m_last_self_refresh + minutes(10) < now && m_table.depth() < 4)
|
||||
{
|
||||
node_id target = m_id;
|
||||
make_id_secret(target);
|
||||
|
|
Loading…
Reference in New Issue