aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-11-16 11:01:19 +0200
committerRiccardo Spagni <ric@spagni.net>2018-11-16 11:01:19 +0200
commit46d0dc28086a118998eed58f8f99f123a49cda77 (patch)
tree064f8cbd2e0f7d061b598a8b71c369b0bb490286 /src
parentMerge pull request #4775 (diff)
parentp2p: less frequent incoming connections check (diff)
downloadmonero-46d0dc28086a118998eed58f8f99f123a49cda77.tar.xz
Merge pull request #4776
03fc731b p2p: less frequent incoming connections check (moneromooo-monero) 14a5c206 p2p: tone down "no incoming connections" warning to info if in peers is 0 (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r--src/p2p/net_node.h2
-rw-r--r--src/p2p/net_node.inl13
2 files changed, 11 insertions, 4 deletions
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h
index 1c348cac4..808945393 100644
--- a/src/p2p/net_node.h
+++ b/src/p2p/net_node.h
@@ -308,7 +308,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;
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index a61b6107f..fbf265fc9 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -1334,12 +1334,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;
}