From 8f6788b2efc562559ed2f9b63c6f49c622887e67 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 22 May 2015 23:54:32 +0100 Subject: Close Ssl Socket on destroy * Fixes #2072 --- src/PolarSSL++/BlockingSslClientSocket.h | 5 +++++ src/Protocol/MojangAPI.cpp | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PolarSSL++/BlockingSslClientSocket.h b/src/PolarSSL++/BlockingSslClientSocket.h index 319e82bf2..462ee95a7 100644 --- a/src/PolarSSL++/BlockingSslClientSocket.h +++ b/src/PolarSSL++/BlockingSslClientSocket.h @@ -21,6 +21,11 @@ class cBlockingSslClientSocket : { public: cBlockingSslClientSocket(void); + + ~cBlockingSslClientSocket(void) + { + Disconnect(); + } /** Connects to the specified server and performs SSL handshake. Returns true if successful, false on failure. Sets internal error text on failure. */ diff --git a/src/Protocol/MojangAPI.cpp b/src/Protocol/MojangAPI.cpp index a12351286..110590359 100644 --- a/src/Protocol/MojangAPI.cpp +++ b/src/Protocol/MojangAPI.cpp @@ -459,7 +459,6 @@ bool cMojangAPI::SecureRequest(const AString & a_ServerName, const AString & a_R a_Response.append((const char *)buf, (size_t)ret); } - Socket.Disconnect(); return true; } -- cgit v1.2.3