Fixed memory leak in some conditions.

This commit is contained in:
XMRig
2020-04-22 10:16:54 +07:00
parent 0e7036cf24
commit ca7ff4e90b

View File

@ -293,7 +293,7 @@ void xmrig::Client::tick(uint64_t now)
}
if (m_state == ConnectingState && m_expire && now > m_expire) {
return reconnect();
close();
}
}
@ -975,7 +975,7 @@ void xmrig::Client::onConnect(uv_connect_t *req, int status)
LOG_ERR("[%s] connect error: \"%s\"", client->url(), uv_strerror(status));
}
if (client->state() == ReconnectingState) {
if (client->state() == ReconnectingState || client->state() == ClosingState) {
return;
}