Merge pull request #439 from majestrate/master

staging
This commit is contained in:
Jeff 2019-03-25 10:38:08 -04:00 committed by GitHub
commit db44a1c106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -345,7 +345,7 @@ namespace llarp
static constexpr llarp_time_t MaxBuildInterval = 30 * 1000;
buildIntervalLimit =
std::min(1000 + buildIntervalLimit, MaxBuildInterval);
// router->routerProfiling().MarkPathFail(p);
router->routerProfiling().MarkPathFail(p);
PathSet::HandlePathBuildTimeout(p);
}

View File

@ -161,6 +161,9 @@ namespace llarp
bool
Router::TryConnectAsync(RouterContact remote, uint16_t numretries)
{
const RouterID us = pubkey();
if(remote.pubkey == us)
return false;
// do we already have a pending job for this remote?
if(HasPendingConnectJob(remote.pubkey))
{
@ -611,6 +614,9 @@ namespace llarp
void
Router::TryEstablishTo(const RouterID &remote)
{
const RouterID us = pubkey();
if(us == remote)
return;
if(!ConnectionToRouterAllowed(remote))
{
LogWarn("not connecting to ", remote, " as it's not permitted by config");