From 17ff6f211438337761fea6dd1979764c97e8d63f Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 22 Dec 2015 12:29:53 +0000 Subject: [PATCH] net_node: fix a hang on exit One loop was not paying attention to the stop signal, and could end up looping forever --- src/p2p/net_node.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 254c9ae7..917f1826 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -570,7 +570,7 @@ namespace nodetool mPeersLoggerThread.reset(new std::thread([&]() { _note("Thread monitor number of peers - start"); - while (!is_closing) + while (!is_closing && !m_net_server.is_stop_signal_sent()) { // main loop of thread //number_of_peers = m_net_server.get_config_object().get_connections_count(); unsigned int number_of_peers = 0;