Code cleanup.

This commit is contained in:
XMRig 2023-06-07 20:48:56 +07:00
parent e80fc25789
commit 7d7f30701f
No known key found for this signature in database
GPG key ID: 446A53638BE94409
4 changed files with 21 additions and 24 deletions

View file

@ -1,6 +1,6 @@
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2023 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -126,9 +126,10 @@ void xmrig::Api::stop()
void xmrig::Api::tick()
{
# ifdef XMRIG_FEATURE_HTTP
if (!m_base->config()->http().isEnabled() || m_httpd->isBound()) {
if (m_httpd->isBound() || !m_base->config()->http().isEnabled()) {
return;
}
if (++m_ticks % 10 == 0) {
m_ticks = 0;
m_httpd->start();