diff --git a/Common/Net/HTTPClient.cpp b/Common/Net/HTTPClient.cpp index 3dd540f326..77132c4719 100644 --- a/Common/Net/HTTPClient.cpp +++ b/Common/Net/HTTPClient.cpp @@ -147,7 +147,6 @@ bool Connection::Connect(int maxTries, double timeout, bool *cancelConnect) { // Something connected. Pick the first one that did (if multiple.) for (int sock : sockets) { if ((intptr_t)sock_ == -1 && FD_ISSET(sock, &fds)) { - fd_util::SetNonBlocking(sock, false); sock_ = sock; } else { closesocket(sock); diff --git a/Common/Net/NetBuffer.cpp b/Common/Net/NetBuffer.cpp index 377de82b5c..b201c2dfc3 100644 --- a/Common/Net/NetBuffer.cpp +++ b/Common/Net/NetBuffer.cpp @@ -1,4 +1,5 @@ -#ifdef _WIN32 +#include "ppsspp_config.h" +#ifdef _WIN32 #include #undef min #undef max @@ -69,7 +70,12 @@ bool Buffer::ReadAllWithProgress(int fd, int knownSize, float *progress, bool *c if (retval == 0) { return true; } else if (retval < 0) { - ERROR_LOG(IO, "Error reading from buffer: %i", retval); +#if PPSSPP_PLATFORM(WINDOWS) + if (WSAGetLastError() != WSAEWOULDBLOCK) +#else + if (errno != EWOULDBLOCK) +#endif + ERROR_LOG(IO, "Error reading from buffer: %i", retval); return false; } char *p = Append((size_t)retval);