1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 04:04:16 +00:00

limit depth of exploratory sent directly

This commit is contained in:
orignal 2014-02-14 22:11:49 -05:00
parent 1545a21682
commit 759fd0815d
2 changed files with 5 additions and 2 deletions

View File

@ -60,7 +60,7 @@ namespace util
{ {
m_Buffer[bytes_transferred] = 0; m_Buffer[bytes_transferred] = 0;
auto address = ExtractAddress (); auto address = ExtractAddress ();
LogPrint (address); //LogPrint (address);
if (address.length () > 1) // not just '/' if (address.length () > 1) // not just '/'
HandleDestinationRequest (address.substr (1)); // exclude '/' HandleDestinationRequest (address.substr (1)); // exclude '/'
else else

View File

@ -494,7 +494,10 @@ namespace data
else // we should send directly else // we should send directly
{ {
if (!dest->IsLeaseSet ()) // if not LeaseSet if (!dest->IsLeaseSet ()) // if not LeaseSet
i2p::transports.SendMessage (router, dest->CreateRequestMessage (router)); {
if (!dest->IsExcluded (router) && dest->GetNumExcludedPeers () < 30)
i2p::transports.SendMessage (router, dest->CreateRequestMessage (router));
}
else else
LogPrint ("Can't request LeaseSet"); LogPrint ("Can't request LeaseSet");
} }