|
|
|
@ -29,6 +29,10 @@ namespace tunnel
@@ -29,6 +29,10 @@ namespace tunnel
|
|
|
|
|
m_NumInboundTunnels (numInboundTunnels), m_NumOutboundTunnels (numOutboundTunnels), |
|
|
|
|
m_IsActive (true), m_CustomPeerSelector(nullptr) |
|
|
|
|
{ |
|
|
|
|
if (m_NumInboundTunnels > TUNNEL_POOL_MAX_INBOUND_TUNNELS_QUANTITY) |
|
|
|
|
m_NumInboundTunnels = TUNNEL_POOL_MAX_INBOUND_TUNNELS_QUANTITY; |
|
|
|
|
if (m_NumOutboundTunnels > TUNNEL_POOL_MAX_OUTBOUND_TUNNELS_QUANTITY) |
|
|
|
|
m_NumOutboundTunnels = TUNNEL_POOL_MAX_OUTBOUND_TUNNELS_QUANTITY; |
|
|
|
|
m_NextManageTime = i2p::util::GetSecondsSinceEpoch () + rand () % TUNNEL_POOL_MANAGE_INTERVAL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|