#541 Revert all changes in Client::close().

This commit is contained in:
XMRig 2018-04-21 22:23:12 +07:00
parent 888d80240d
commit 593056113c
2 changed files with 3 additions and 24 deletions

View file

@ -205,28 +205,7 @@ bool Client::close()
setState(ClosingState);
uv_stream_t *stream = reinterpret_cast<uv_stream_t*>(m_socket);
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 {
if (uv_is_closing(reinterpret_cast<uv_handle_t*>(m_socket)) == 0) {
uv_close(reinterpret_cast<uv_handle_t*>(m_socket), Client::onClose);
}

View file

@ -27,7 +27,7 @@
#define APP_ID "xmrig"
#define APP_NAME "XMRig"
#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_SITE "www.xmrig.com"
#define APP_COPYRIGHT "Copyright (C) 2016-2018 xmrig.com"
@ -35,7 +35,7 @@
#define APP_VER_MAJOR 2
#define APP_VER_MINOR 5
#define APP_VER_BUILD 2
#define APP_VER_BUILD 3
#define APP_VER_REV 0
#ifdef _MSC_VER