Merge pull request #3221

2e584dcb p2p: do not try to connect to peers in offline mode (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-02-16 14:23:22 +01:00
commit a54247b993
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 2 additions and 0 deletions

View File

@ -1164,6 +1164,7 @@ namespace nodetool
template<class t_payload_net_handler> template<class t_payload_net_handler>
bool node_server<t_payload_net_handler>::connections_maker() bool node_server<t_payload_net_handler>::connections_maker()
{ {
if (m_offline) return true;
if (!connect_to_peerlist(m_exclusive_peers)) return false; if (!connect_to_peerlist(m_exclusive_peers)) return false;
if (!m_exclusive_peers.empty()) return true; if (!m_exclusive_peers.empty()) return true;
@ -1935,6 +1936,7 @@ namespace nodetool
template<class t_payload_net_handler> template<class t_payload_net_handler>
bool node_server<t_payload_net_handler>::gray_peerlist_housekeeping() bool node_server<t_payload_net_handler>::gray_peerlist_housekeeping()
{ {
if (m_offline) return true;
if (!m_exclusive_peers.empty()) return true; if (!m_exclusive_peers.empty()) return true;
peerlist_entry pe = AUTO_VAL_INIT(pe); peerlist_entry pe = AUTO_VAL_INIT(pe);