exit node tweaks

pull/576/head
Jeff Becker 5 years ago
parent 5921086391
commit c5c28a528f
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -27,6 +27,7 @@ namespace llarp
void BaseSession::HandlePathDied(path::Path_ptr)
{
BuildOne();
}
util::StatusObject
@ -52,7 +53,7 @@ namespace llarp
return false;
const size_t expect = (1 + (m_NumPaths / 2));
// check 30 seconds into the future and see if we need more paths
const llarp_time_t future = now + (30 * 1000);
const llarp_time_t future = now + (30 * 1000) + buildIntervalLimit;
return NumPathsExistingAt(future) < expect;
}

@ -1094,6 +1094,8 @@ namespace llarp
void
Router::Tick()
{
if(_stopping)
return;
// LogDebug("tick router");
auto now = Now();
@ -1724,8 +1726,10 @@ namespace llarp
|| self->HasPendingConnectJob(other.pubkey)))
{
if(!self->IsBootstrapNode(other.pubkey))
self->TryConnectAsync(other, 5);
--want;
{
if(self->TryConnectAsync(other, 5))
--want;
}
}
return want > 0;
});

Loading…
Cancel
Save