mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 19:39:22 +00:00
ZMQReader: make sure monitor always shuts down
This commit is contained in:
parent
1b9d14e89d
commit
1c7646f98f
1 changed files with 5 additions and 2 deletions
|
@ -155,7 +155,11 @@ void ZMQReader::run()
|
|||
LOGERR(1, "failed to start ZMQ monitor thread, error " << uv_err_name(err));
|
||||
throw zmq::error_t(EMTHREAD);
|
||||
}
|
||||
ON_SCOPE_LEAVE([this]() { uv_thread_join(&m_monitorThread); });
|
||||
|
||||
ON_SCOPE_LEAVE([this]() {
|
||||
m_monitor->abort();
|
||||
uv_thread_join(&m_monitorThread);
|
||||
});
|
||||
|
||||
LOGINFO(1, "worker thread ready");
|
||||
|
||||
|
@ -166,7 +170,6 @@ void ZMQReader::run()
|
|||
}
|
||||
|
||||
if (m_stopped) {
|
||||
m_monitor->abort();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue