Fixed bugs.

This commit is contained in:
XMRig 2019-07-18 04:21:14 +07:00
parent 6f93b7b38d
commit 871bc3e180
2 changed files with 5 additions and 3 deletions

View file

@ -29,11 +29,13 @@
#include <uv.h>
#include "backend/common/interfaces/IWorker.h"
namespace xmrig {
class IBackend;
class IWorker;
template<class T>
@ -41,7 +43,7 @@ class Thread
{
public:
inline Thread(IBackend *backend, size_t index, const T &config) : m_index(index), m_config(config), m_backend(backend) {}
inline ~Thread() { uv_thread_join(&m_thread); }
inline ~Thread() { uv_thread_join(&m_thread); delete m_worker; }
inline const T &config() const { return m_config; }
inline IBackend *backend() const { return m_backend; }

View file

@ -158,7 +158,7 @@ void xmrig::CpuWorker<N>::start()
do {
std::this_thread::sleep_for(std::chrono::milliseconds(200));
}
while (Nonce::isPaused());
while (Nonce::isPaused() && Nonce::sequence(Nonce::CPU) > 0);
if (Nonce::sequence(Nonce::CPU) == 0) {
break;