diff --git a/llarp/link/utp.cpp b/llarp/link/utp.cpp index 4542b508f..e450fdfb9 100644 --- a/llarp/link/utp.cpp +++ b/llarp/link/utp.cpp @@ -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; } diff --git a/llarp/service/endpoint.cpp b/llarp/service/endpoint.cpp index 111300ec9..a72443cb5 100644 --- a/llarp/service/endpoint.cpp +++ b/llarp/service/endpoint.cpp @@ -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; } }