diff --git a/core/src/utils/networking.cpp b/core/src/utils/networking.cpp index f8df21b2..9b4a3bb7 100644 --- a/core/src/utils/networking.cpp +++ b/core/src/utils/networking.cpp @@ -36,6 +36,7 @@ namespace net { #ifdef _WIN32 closesocket(_sock); #else + ::shutdown(_sock, SHUT_RDWR); ::close(_sock); #endif } diff --git a/spyserver_source/src/spyserver_client.cpp b/spyserver_source/src/spyserver_client.cpp index 63dec22e..ae1657ea 100644 --- a/spyserver_source/src/spyserver_client.cpp +++ b/spyserver_source/src/spyserver_client.cpp @@ -11,6 +11,8 @@ namespace spyserver { client = std::move(conn); output = out; + output->clearWriteStop(); + sendHandshake("SDR++"); client->readAsync(sizeof(SpyServerMessageHeader), (uint8_t*)&receivedHeader, dataHandler, this); @@ -31,6 +33,7 @@ namespace spyserver { } void SpyServerClientClass::close() { + output->stopWriter(); client->close(); }