jimloco/Csocket — pull request #3 by KiNgMaR (2011-11-09 20:57:35+00:00)
Title: Win32: Csock destructor should preverse internal Winsock error code status

The destructor may call closesocket() or other winsock API methods that (re)set WSAGetLastError() to SUCCESS when there really has been an error before.

Since destruction of the socket may be triggered from within Csock classes, unknowingly to the outside callers, the error code should be preserved.