P2P: give peers from --addpeers a 2-second headstart before connecting to other peers
This commit is contained in:
+3
-2
@@ -1297,11 +1297,12 @@ void P2PServer::on_timer()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
++m_timerCounter;
|
const uint64_t t = ++m_timerCounter;
|
||||||
|
|
||||||
if (!m_initialPeerList.empty()) {
|
if ((t == 1) && !m_initialPeerList.empty()) {
|
||||||
connect_to_peers(m_initialPeerList);
|
connect_to_peers(m_initialPeerList);
|
||||||
m_initialPeerList.clear();
|
m_initialPeerList.clear();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
flush_cache();
|
flush_cache();
|
||||||
|
|||||||
Reference in New Issue
Block a user