pick tunnels from exploratory pool for exploratory

This commit is contained in:
orignal 2014-04-03 16:27:37 -04:00
parent 13b2036e52
commit 24f0ff6c00
4 changed files with 23 additions and 3 deletions

View file

@ -532,8 +532,9 @@ namespace data
void NetDb::Explore ()
{
auto outbound = i2p::tunnel::tunnels.GetNextOutboundTunnel ();
auto inbound = i2p::tunnel::tunnels.GetNextInboundTunnel ();
auto exploratoryPool = i2p::tunnel::tunnels.GetExploratoryPool ();
auto outbound = exploratoryPool ? exploratoryPool->GetNextOutboundTunnel () : nullptr;
auto inbound = exploratoryPool ? exploratoryPool->GetNextInboundTunnel () : nullptr;
if (outbound && inbound)
{
CryptoPP::RandomNumberGenerator& rnd = i2p::context.GetRandomNumberGenerator ();