From 593056113c10a1861e3ddc78d825526f82c7e2a5 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sat, 21 Apr 2018 22:23:12 +0700 Subject: [PATCH] #541 Revert all changes in Client::close(). --- src/net/Client.cpp | 23 +---------------------- src/version.h | 4 ++-- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/src/net/Client.cpp b/src/net/Client.cpp index c8a93f24c..9e6758e38 100644 --- a/src/net/Client.cpp +++ b/src/net/Client.cpp @@ -205,28 +205,7 @@ bool Client::close() setState(ClosingState); - uv_stream_t *stream = reinterpret_cast(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(req->handle)) == 0) { - uv_close(reinterpret_cast(req->handle), Client::onClose); - } - - delete req; - }); - - assert(rc == 0); - - if (rc != 0) { - onClose(); - } - } - else { + if (uv_is_closing(reinterpret_cast(m_socket)) == 0) { uv_close(reinterpret_cast(m_socket), Client::onClose); } diff --git a/src/version.h b/src/version.h index 060edcb72..4b44f2e80 100644 --- a/src/version.h +++ b/src/version.h @@ -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