fix keepalive config from being ignored
When a pool reports it supports keepalive, but a client has set keepalive:false or keepalive:0 in the config, this was ignored and keepalive was always enabled.
This commit is contained in:
parent
69590f9777
commit
695e1a93a3
1 changed files with 1 additions and 1 deletions
|
@ -940,7 +940,7 @@ void xmrig::Client::startTimeout()
|
||||||
{
|
{
|
||||||
m_expire = 0;
|
m_expire = 0;
|
||||||
|
|
||||||
if (has<EXT_KEEPALIVE>()) {
|
if (has<EXT_KEEPALIVE>() && m_pool.keepAlive() > 0) {
|
||||||
const uint64_t ms = static_cast<uint64_t>(m_pool.keepAlive() > 0 ? m_pool.keepAlive() : Pool::kKeepAliveTimeout) * 1000;
|
const uint64_t ms = static_cast<uint64_t>(m_pool.keepAlive() > 0 ? m_pool.keepAlive() : Pool::kKeepAliveTimeout) * 1000;
|
||||||
|
|
||||||
m_keepAlive = Chrono::steadyMSecs() + ms;
|
m_keepAlive = Chrono::steadyMSecs() + ms;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue