aboutsummaryrefslogtreecommitdiff
path: root/src/p2p
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-22 12:29:53 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-22 12:38:52 +0000
commit17ff6f211438337761fea6dd1979764c97e8d63f (patch)
tree4890062b0434b5d1dd2a2ad018c051a75775cbdf /src/p2p
parentMerge pull request #552 (diff)
downloadmonero-17ff6f211438337761fea6dd1979764c97e8d63f.tar.xz
net_node: fix a hang on exit
One loop was not paying attention to the stop signal, and could end up looping forever
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/net_node.inl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 254c9ae72..917f18266 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;