#1158 Potential fix for segmentation fault.
This commit is contained in:
parent
f1a9302c3e
commit
a8c2e908a2
@ -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));
|
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;
|
delete req;
|
||||||
client->close();
|
client->close();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user