mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-07 07:55:04 -05:00
Fixed bug in keepalive feature.
This commit is contained in:
@@ -234,6 +234,8 @@ void xmrig::Client::tick(uint64_t now)
|
||||
else if (m_keepAlive && now > m_keepAlive) {
|
||||
ping();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_expire && now > m_expire && m_state == ConnectingState) {
|
||||
@@ -754,6 +756,8 @@ void xmrig::Client::parseResponse(int64_t id, const rapidjson::Value &result, co
|
||||
void xmrig::Client::ping()
|
||||
{
|
||||
send(snprintf(m_sendBuf, sizeof(m_sendBuf), "{\"id\":%" PRId64 ",\"jsonrpc\":\"2.0\",\"method\":\"keepalived\",\"params\":{\"id\":\"%s\"}}\n", m_sequence, m_rpcId.data()));
|
||||
|
||||
m_keepAlive = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user