mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 02:54:01 +01:00
revert
This commit is contained in:
parent
d030df925f
commit
be6aab4c40
16
Tunnel.cpp
16
Tunnel.cpp
|
@ -642,11 +642,7 @@ namespace tunnel
|
|||
{
|
||||
// trying to create one more oubound tunnel
|
||||
auto inboundTunnel = GetNextInboundTunnel ();
|
||||
std::shared_ptr<const i2p::data::RouterInfo> router(nullptr);
|
||||
if (i2p::transport::transports.RoutesRestricted())
|
||||
router = i2p::transport::transports.GetRestrictedPeer();
|
||||
else
|
||||
router = i2p::data::netdb.GetRandomRouter ();
|
||||
auto router = i2p::data::netdb.GetRandomRouter ();
|
||||
if (!inboundTunnel || !router) return;
|
||||
LogPrint (eLogDebug, "Tunnel: creating one hop outbound tunnel");
|
||||
CreateTunnel<OutboundTunnel> (
|
||||
|
@ -707,13 +703,9 @@ namespace tunnel
|
|||
|
||||
if (m_OutboundTunnels.empty () || m_InboundTunnels.size () < 5)
|
||||
{
|
||||
// trying to create one more inbound tunnel
|
||||
std::shared_ptr<const i2p::data::RouterInfo> router(nullptr);
|
||||
if (i2p::transport::transports.RoutesRestricted())
|
||||
router = i2p::transport::transports.GetRestrictedPeer();
|
||||
else
|
||||
router = i2p::data::netdb.GetRandomRouter ();
|
||||
if (!router) {
|
||||
// trying to create one more inbound tunnel
|
||||
auto router = i2p::data::netdb.GetRandomRouter ();
|
||||
if (!router) {
|
||||
LogPrint (eLogWarning, "Tunnel: can't find any router, skip creating tunnel");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue