mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-16 00:12:43 +00:00
some cleanup
This commit is contained in:
parent
20a5e19ea1
commit
af0d853ccd
@ -460,9 +460,8 @@ namespace transport
|
|||||||
auto it = m_Peers.find (ident);
|
auto it = m_Peers.find (ident);
|
||||||
if (it == m_Peers.end ())
|
if (it == m_Peers.end ())
|
||||||
{
|
{
|
||||||
// check if not known as unreachable
|
// check if not banned
|
||||||
auto profile = i2p::data::GetRouterProfile (ident);
|
if (i2p::data::IsRouterBanned (ident)) return; // don't create peer to unreachable router
|
||||||
if (profile && profile->IsUnreachable ()) return; // don't create peer to unreachable router
|
|
||||||
// try to connect
|
// try to connect
|
||||||
bool connected = false;
|
bool connected = false;
|
||||||
try
|
try
|
||||||
@ -491,7 +490,6 @@ namespace transport
|
|||||||
{
|
{
|
||||||
if (sz < CHECK_PROFILE_NUM_DELAYED_MESSAGES && sz + msgs.size () >= CHECK_PROFILE_NUM_DELAYED_MESSAGES)
|
if (sz < CHECK_PROFILE_NUM_DELAYED_MESSAGES && sz + msgs.size () >= CHECK_PROFILE_NUM_DELAYED_MESSAGES)
|
||||||
{
|
{
|
||||||
auto profile = i2p::data::GetRouterProfile (ident);
|
|
||||||
if (i2p::data::IsRouterBanned (ident))
|
if (i2p::data::IsRouterBanned (ident))
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "Transports: Router ", ident.ToBase64 (), " is banned. Peer dropped");
|
LogPrint (eLogWarning, "Transports: Router ", ident.ToBase64 (), " is banned. Peer dropped");
|
||||||
|
Loading…
Reference in New Issue
Block a user