aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.inl
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-06-19 12:56:31 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-06-19 12:56:31 -0500
commitcb130c759059e670fd30a10a436fb286fd556da4 (patch)
tree0bedd1afc2b5a490b2a1640a3ca5a5b5d1898577 /src/p2p/net_node.inl
parentMerge pull request #3852 (diff)
parentp2p: warn when no incoming connections are seen for a while (diff)
downloadmonero-cb130c759059e670fd30a10a436fb286fd556da4.tar.xz
Merge pull request #3861
de1ffe0 p2p: warn when no incoming connections are seen for a while (moneromooo-monero)
Diffstat (limited to 'src/p2p/net_node.inl')
-rw-r--r--src/p2p/net_node.inl14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 07f369d40..5b65ba4d2 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -1300,6 +1300,20 @@ namespace nodetool
m_connections_maker_interval.do_call(boost::bind(&node_server<t_payload_net_handler>::connections_maker, this));
m_gray_peerlist_housekeeping_interval.do_call(boost::bind(&node_server<t_payload_net_handler>::gray_peerlist_housekeeping, this));
m_peerlist_store_interval.do_call(boost::bind(&node_server<t_payload_net_handler>::store_config, this));
+ m_incoming_connections_interval.do_call(boost::bind(&node_server<t_payload_net_handler>::check_incoming_connections, this));
+ return true;
+ }
+ //-----------------------------------------------------------------------------------
+ template<class t_payload_net_handler>
+ bool node_server<t_payload_net_handler>::check_incoming_connections()
+ {
+ if (m_offline || m_hide_my_port)
+ 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());
+ }
return true;
}
//-----------------------------------------------------------------------------------