mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 17:32:33 +00:00
Merge pull request #2928
d28c388f
p2p: stop net server before closing starting connections (moneromooo-monero)
This commit is contained in:
commit
c611cca462
1 changed files with 5 additions and 2 deletions
|
@ -649,6 +649,10 @@ namespace nodetool
|
|||
template<class t_payload_net_handler>
|
||||
bool node_server<t_payload_net_handler>::send_stop_signal()
|
||||
{
|
||||
MDEBUG("[node] sending stop signal");
|
||||
m_net_server.send_stop_signal();
|
||||
MDEBUG("[node] Stop signal sent");
|
||||
|
||||
std::list<boost::uuids::uuid> connection_ids;
|
||||
m_net_server.get_config_object().foreach_connection([&](const p2p_connection_context& cntxt) {
|
||||
connection_ids.push_back(cntxt.m_connection_id);
|
||||
|
@ -658,8 +662,7 @@ namespace nodetool
|
|||
m_net_server.get_config_object().close(connection_id);
|
||||
|
||||
m_payload_handler.stop();
|
||||
m_net_server.send_stop_signal();
|
||||
MDEBUG("[node] Stop signal sent");
|
||||
|
||||
return true;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue