Fixes: [18670] Properly close sockets when WSACleanup is called
