Skip to content

Commit

Permalink
don't create peer for unreachable router
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Jan 16, 2024
1 parent 49f4dc5 commit 7cfcb12
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libi2pd/Transports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,10 @@ namespace transport
auto it = m_Peers.find (ident);
if (it == m_Peers.end ())
{
// check if not known as unreachable
auto profile = i2p::data::GetRouterProfile (ident);
if (profile && profile->IsUnreachable ()) return; // don't create peer to unreachable router
// try to connect
bool connected = false;
try
{
Expand Down

0 comments on commit 7cfcb12

Please sign in to comment.