Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/p2p/net_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ namespace nodetool
epee::math_helper::once_a_time_seconds<1> m_connections_maker_interval;
epee::math_helper::once_a_time_seconds<60*30, false> m_peerlist_store_interval;
epee::math_helper::once_a_time_seconds<60> m_gray_peerlist_housekeeping_interval;
epee::math_helper::once_a_time_seconds<900, false> m_incoming_connections_interval;
epee::math_helper::once_a_time_seconds<3600, false> m_incoming_connections_interval;

std::string m_bind_ip;
std::string m_port;
Expand Down
13 changes: 10 additions & 3 deletions src/p2p/net_node.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1322,12 +1322,19 @@ namespace nodetool
template<class t_payload_net_handler>
bool node_server<t_payload_net_handler>::check_incoming_connections()
{
if (m_offline || m_hide_my_port)
if (m_offline)
return true;
if (get_incoming_connections_count() == 0)
{
const el::Level level = el::Level::Warning;
MCLOG_RED(level, "global", "No incoming connections - check firewalls/routers allow port " << get_this_peer_port());
if (m_hide_my_port || m_config.m_net_config.max_in_connection_count == 0)
{
MGINFO("Incoming connections disabled, enable them for full connectivity");
}
else
{
const el::Level level = el::Level::Warning;
MCLOG_RED(level, "global", "No incoming connections - check firewalls/routers allow port " << get_this_peer_port());
}
}
return true;
}
Expand Down