net_node: fix a hang on exit

One loop was not paying attention to the stop signal, and could
end up looping forever
This commit is contained in:
moneromooo-monero 2015-12-22 12:29:53 +00:00
parent 40880d7cb8
commit 17ff6f2114
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 1 additions and 1 deletions

View File

@ -570,7 +570,7 @@ namespace nodetool
mPeersLoggerThread.reset(new std::thread([&]() mPeersLoggerThread.reset(new std::thread([&]()
{ {
_note("Thread monitor number of peers - start"); _note("Thread monitor number of peers - start");
while (!is_closing) while (!is_closing && !m_net_server.is_stop_signal_sent())
{ // main loop of thread { // main loop of thread
//number_of_peers = m_net_server.get_config_object().get_connections_count(); //number_of_peers = m_net_server.get_config_object().get_connections_count();
unsigned int number_of_peers = 0; unsigned int number_of_peers = 0;