diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-12-22 12:29:53 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-12-22 12:38:52 +0000 |
commit | 17ff6f211438337761fea6dd1979764c97e8d63f (patch) | |
tree | 4890062b0434b5d1dd2a2ad018c051a75775cbdf /src/p2p | |
parent | Merge pull request #552 (diff) | |
download | monero-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.inl | 2 |
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; |