only log errors on sessions made with utp

only rebuild paths when introset changes router for outbound context
pull/15/head
Jeff Becker 6 years ago
parent d1f1dd3c84
commit 8d679b00a7
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -349,11 +349,15 @@ namespace llarp
{
BaseSession* session =
static_cast< BaseSession* >(utp_get_userdata(arg->socket));
if(arg->error_code == UTP_ETIMEDOUT && session)
if(session)
{
session->Router()->OnConnectTimeout(session->GetPubKey());
if(arg->error_code == UTP_ETIMEDOUT)
{
session->Router()->OnConnectTimeout(session->GetPubKey());
}
llarp::LogError(utp_error_code_names[arg->error_code], " via ",
session->remoteAddr);
}
llarp::LogError(utp_error_code_names[arg->error_code]);
return 0;
}

@ -987,8 +987,8 @@ namespace llarp
m_Endpoint->EnsureRouterIsKnown(intro.router);
if(m_BadIntros.count(intro) == 0 && remoteIntro != intro)
{
shifted = intro.router != remoteIntro.router;
remoteIntro = intro;
shifted = true;
break;
}
}

Loading…
Cancel
Save