Fixed memory leak in some conditions.
This commit is contained in:
parent
0e7036cf24
commit
ca7ff4e90b
1 changed files with 2 additions and 2 deletions
|
@ -293,7 +293,7 @@ void xmrig::Client::tick(uint64_t now)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_state == ConnectingState && m_expire && now > m_expire) {
|
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));
|
LOG_ERR("[%s] connect error: \"%s\"", client->url(), uv_strerror(status));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->state() == ReconnectingState) {
|
if (client->state() == ReconnectingState || client->state() == ClosingState) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue