xmr_arch64 - Version 0.0.2
This commit is contained in:
parent
e72294bb34
commit
bb34b4d5b6
1 changed files with 2 additions and 7 deletions
|
@ -24,8 +24,7 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <uv.h>
|
#include <uv.h>
|
||||||
|
//---
|
||||||
|
|
||||||
#include "api/Api.h"
|
#include "api/Api.h"
|
||||||
#include "App.h"
|
#include "App.h"
|
||||||
#include "Console.h"
|
#include "Console.h"
|
||||||
|
@ -113,11 +112,9 @@ int App::exec()
|
||||||
if (!m_options) {
|
if (!m_options) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uv_signal_start(&m_signal, App::onSignal, SIGHUP);
|
uv_signal_start(&m_signal, App::onSignal, SIGHUP);
|
||||||
uv_signal_start(&m_signal, App::onSignal, SIGTERM);
|
uv_signal_start(&m_signal, App::onSignal, SIGTERM);
|
||||||
uv_signal_start(&m_signal, App::onSignal, SIGINT);
|
uv_signal_start(&m_signal, App::onSignal, SIGINT);
|
||||||
|
|
||||||
background();
|
background();
|
||||||
|
|
||||||
if (!CryptoNight::init(m_options->algo(), m_options->algoVariant())) {
|
if (!CryptoNight::init(m_options->algo(), m_options->algoVariant())) {
|
||||||
|
@ -136,16 +133,14 @@ int App::exec()
|
||||||
m_httpd = new Httpd(m_options->apiPort(), m_options->apiToken());
|
m_httpd = new Httpd(m_options->apiPort(), m_options->apiToken());
|
||||||
m_httpd->start();
|
m_httpd->start();
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
Workers::start(m_options->affinity(), m_options->priority());
|
Workers::start(m_options->affinity(), m_options->priority());
|
||||||
|
|
||||||
m_network->connect();
|
|
||||||
|
|
||||||
|
m_network->connect();
|
||||||
const int r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
const int r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
||||||
uv_loop_close(uv_default_loop());
|
uv_loop_close(uv_default_loop());
|
||||||
|
|
||||||
delete m_network;
|
delete m_network;
|
||||||
|
|
||||||
Options::release();
|
Options::release();
|
||||||
Mem::release();
|
Mem::release();
|
||||||
Platform::release();
|
Platform::release();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue