mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-17 08:17:40 +00:00
#541 Revert all changes in Client::close().
This commit is contained in:
parent
888d80240d
commit
593056113c
2 changed files with 3 additions and 24 deletions
|
@ -205,28 +205,7 @@ bool Client::close()
|
||||||
|
|
||||||
setState(ClosingState);
|
setState(ClosingState);
|
||||||
|
|
||||||
uv_stream_t *stream = reinterpret_cast<uv_stream_t*>(m_socket);
|
if (uv_is_closing(reinterpret_cast<uv_handle_t*>(m_socket)) == 0) {
|
||||||
|
|
||||||
if (uv_is_readable(stream) == 1) {
|
|
||||||
uv_read_stop(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uv_is_writable(stream) == 1) {
|
|
||||||
const int rc = uv_shutdown(new uv_shutdown_t, stream, [](uv_shutdown_t* req, int status) {
|
|
||||||
if (uv_is_closing(reinterpret_cast<uv_handle_t*>(req->handle)) == 0) {
|
|
||||||
uv_close(reinterpret_cast<uv_handle_t*>(req->handle), Client::onClose);
|
|
||||||
}
|
|
||||||
|
|
||||||
delete req;
|
|
||||||
});
|
|
||||||
|
|
||||||
assert(rc == 0);
|
|
||||||
|
|
||||||
if (rc != 0) {
|
|
||||||
onClose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
uv_close(reinterpret_cast<uv_handle_t*>(m_socket), Client::onClose);
|
uv_close(reinterpret_cast<uv_handle_t*>(m_socket), Client::onClose);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#define APP_ID "xmrig"
|
#define APP_ID "xmrig"
|
||||||
#define APP_NAME "XMRig"
|
#define APP_NAME "XMRig"
|
||||||
#define APP_DESC "XMRig CPU miner"
|
#define APP_DESC "XMRig CPU miner"
|
||||||
#define APP_VERSION "2.5.2"
|
#define APP_VERSION "2.5.3"
|
||||||
#define APP_DOMAIN "xmrig.com"
|
#define APP_DOMAIN "xmrig.com"
|
||||||
#define APP_SITE "www.xmrig.com"
|
#define APP_SITE "www.xmrig.com"
|
||||||
#define APP_COPYRIGHT "Copyright (C) 2016-2018 xmrig.com"
|
#define APP_COPYRIGHT "Copyright (C) 2016-2018 xmrig.com"
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
#define APP_VER_MAJOR 2
|
#define APP_VER_MAJOR 2
|
||||||
#define APP_VER_MINOR 5
|
#define APP_VER_MINOR 5
|
||||||
#define APP_VER_BUILD 2
|
#define APP_VER_BUILD 3
|
||||||
#define APP_VER_REV 0
|
#define APP_VER_REV 0
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
Loading…
Reference in a new issue