p2p: do not try to connect to peers in offline mode

This commit is contained in:
moneromooo-monero 2018-02-01 11:48:03 +00:00
parent ed67e5c001
commit 2e584dcb1f
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

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