mirror of
https://github.com/xmrig/xmrig.git
synced 2025-02-02 03:06:30 +00:00
#1158 Potential fix for segmentation fault.
This commit is contained in:
parent
f1a9302c3e
commit
a8c2e908a2
1 changed files with 6 additions and 0 deletions
|
@ -900,6 +900,12 @@ void xmrig::Client::onConnect(uv_connect_t *req, int status)
|
|||
LOG_ERR("[%s] connect error: \"%s\"", client->url(), uv_strerror(status));
|
||||
}
|
||||
|
||||
if (client->state() != ConnectingState) {
|
||||
LOG_ERR("[%s] connect error: \"invalid state: %d\"", client->url(), client->state());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
delete req;
|
||||
client->close();
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue