From 695e1a93a347919880e5740e792a52aa301c7be7 Mon Sep 17 00:00:00 2001 From: Jethro Grassie Date: Fri, 19 Mar 2021 13:03:13 -0400 Subject: [PATCH] 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. --- src/base/net/stratum/Client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/net/stratum/Client.cpp b/src/base/net/stratum/Client.cpp index 5327867e..11832625 100644 --- a/src/base/net/stratum/Client.cpp +++ b/src/base/net/stratum/Client.cpp @@ -940,7 +940,7 @@ void xmrig::Client::startTimeout() { m_expire = 0; - if (has()) { + if (has() && m_pool.keepAlive() > 0) { const uint64_t ms = static_cast(m_pool.keepAlive() > 0 ? m_pool.keepAlive() : Pool::kKeepAliveTimeout) * 1000; m_keepAlive = Chrono::steadyMSecs() + ms;