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;
auto address = ExtractAddress ();
LogPrint (address);
//LogPrint (address);
if (address.length () > 1) // not just '/'
HandleDestinationRequest (address.substr (1)); // exclude '/'
else

View File

@ -494,7 +494,10 @@ namespace data
else // we should send directly
{
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
LogPrint ("Can't request LeaseSet");
}