Merge remote-tracking branch 'xmrig/master' into dev
This commit is contained in:
commit
ede0149552
5 changed files with 19 additions and 14 deletions
|
@ -179,7 +179,7 @@ This will limit doublehash mode (av=2,av=4) to thread 0 and thread 2, thread 1 a
|
|||
|
||||
### HUGE PAGES unavailable (Windows)
|
||||
* Run XMRig as Administrator.
|
||||
* Since version 0.8.0 XMRig automatically enable SeLockMemoryPrivilege for current user, but reboot or sign out still required. [Manual instruction](https://msdn.microsoft.com/en-gb/library/ms190730.aspx).
|
||||
* Since version 0.8.0 XMRig automatically enables SeLockMemoryPrivilege for current user, but reboot or sign out still required. [Manual instruction](https://msdn.microsoft.com/en-gb/library/ms190730.aspx).
|
||||
|
||||
### HUGE PAGES unavailable (Linux)
|
||||
* Before starting XMRigDaemon set huge pages
|
||||
|
|
10
src/App.cpp
10
src/App.cpp
|
@ -96,7 +96,9 @@ App::App(int argc, char **argv) :
|
|||
|
||||
m_network = new Network(m_options);
|
||||
|
||||
uv_signal_init(uv_default_loop(), &m_signal);
|
||||
uv_signal_init(uv_default_loop(), &m_sigHUP);
|
||||
uv_signal_init(uv_default_loop(), &m_sigINT);
|
||||
uv_signal_init(uv_default_loop(), &m_sigTERM);
|
||||
}
|
||||
|
||||
App::~App()
|
||||
|
@ -127,9 +129,9 @@ int App::start()
|
|||
return EINVAL;
|
||||
}
|
||||
|
||||
uv_signal_start(&m_signal, App::onSignal, SIGHUP);
|
||||
uv_signal_start(&m_signal, App::onSignal, SIGTERM);
|
||||
uv_signal_start(&m_signal, App::onSignal, SIGINT);
|
||||
uv_signal_start(&m_sigHUP, App::onSignal, SIGHUP);
|
||||
uv_signal_start(&m_sigINT, App::onSignal, SIGINT);
|
||||
uv_signal_start(&m_sigTERM, App::onSignal, SIGTERM);
|
||||
|
||||
background();
|
||||
|
||||
|
|
|
@ -66,8 +66,10 @@ private:
|
|||
Httpd *m_httpd;
|
||||
Network *m_network;
|
||||
Options *m_options;
|
||||
uv_signal_t m_sigHUP;
|
||||
uv_signal_t m_sigINT;
|
||||
uv_signal_t m_sigTERM;
|
||||
CCClient *m_ccclient;
|
||||
uv_signal_t m_signal;
|
||||
uv_async_t m_async;
|
||||
};
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/resource.h>
|
||||
#include <uv.h>
|
||||
|
|
|
@ -582,11 +582,11 @@ void Client::onRead(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf)
|
|||
LOG_ERR("[%s:%u] read error: \"%s\"", client->m_url.host(), client->m_url.port(), uv_strerror((int) nread));
|
||||
}
|
||||
|
||||
return client->close();;
|
||||
return client->close();
|
||||
}
|
||||
|
||||
if ((size_t) nread > (sizeof(m_buf) - 8 - client->m_recvBufPos)) {
|
||||
return client->close();;
|
||||
return client->close();
|
||||
}
|
||||
|
||||
client->m_recvBufPos += nread;
|
||||
|
@ -623,7 +623,7 @@ void Client::onResolved(uv_getaddrinfo_t *req, int status, struct addrinfo *res)
|
|||
auto client = getClient(req->data);
|
||||
if (status < 0) {
|
||||
LOG_ERR("[%s:%u] DNS error: \"%s\"", client->m_url.host(), client->m_url.port(), uv_strerror(status));
|
||||
return client->reconnect();;
|
||||
return client->reconnect();
|
||||
}
|
||||
|
||||
addrinfo *ptr = res;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue