diff --git a/Utilities/Socket.h b/Utilities/Socket.h index bc574668..2479febe 100644 --- a/Utilities/Socket.h +++ b/Utilities/Socket.h @@ -210,6 +210,12 @@ public: SetConnectionErrorFlag(); } + if(returnVal == 0) { + //Socket closed + std::cout << "Socket closed by peer." << std::endl; + Close(); + } + return returnVal; } };