Skip to content

Commit f8876a0

Browse files
authored
Merge pull request #81 from stoffu/aeon-icw
p2p: tone down "no incoming connections" warning to info if in peers is 0 /monero#4776
2 parents 6c80323 + 6738475 commit f8876a0

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/p2p/net_node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ namespace nodetool
305305
epee::math_helper::once_a_time_seconds<1> m_connections_maker_interval;
306306
epee::math_helper::once_a_time_seconds<60*30, false> m_peerlist_store_interval;
307307
epee::math_helper::once_a_time_seconds<60> m_gray_peerlist_housekeeping_interval;
308-
epee::math_helper::once_a_time_seconds<900, false> m_incoming_connections_interval;
308+
epee::math_helper::once_a_time_seconds<3600, false> m_incoming_connections_interval;
309309

310310
std::string m_bind_ip;
311311
std::string m_port;

src/p2p/net_node.inl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,12 +1322,19 @@ namespace nodetool
13221322
template<class t_payload_net_handler>
13231323
bool node_server<t_payload_net_handler>::check_incoming_connections()
13241324
{
1325-
if (m_offline || m_hide_my_port)
1325+
if (m_offline)
13261326
return true;
13271327
if (get_incoming_connections_count() == 0)
13281328
{
1329-
const el::Level level = el::Level::Warning;
1330-
MCLOG_RED(level, "global", "No incoming connections - check firewalls/routers allow port " << get_this_peer_port());
1329+
if (m_hide_my_port || m_config.m_net_config.max_in_connection_count == 0)
1330+
{
1331+
MGINFO("Incoming connections disabled, enable them for full connectivity");
1332+
}
1333+
else
1334+
{
1335+
const el::Level level = el::Level::Warning;
1336+
MCLOG_RED(level, "global", "No incoming connections - check firewalls/routers allow port " << get_this_peer_port());
1337+
}
13311338
}
13321339
return true;
13331340
}

0 commit comments

Comments
 (0)