http: Fix timeout mid request.

Sometimes we think a socket is ready, and it isn't.  We shouldn't fail the
whole read just because of this.
This commit is contained in:
Unknown W. Brackets committed 2021-09-25 23:26:38 -07:00
1 parent 2adc3c668a
commit dfe945710d
1 file changed
+7 -3
+7 -3
View File
@@ -73,12 +73,16 @@ bool Buffer::ReadAllWithProgress(int fd, int knownSize, float *progress, float *
return true;
} else if (retval < 0) {
#if PPSSPP_PLATFORM(WINDOWS)
if (WSAGetLastError() != WSAEWOULDBLOCK)
if (WSAGetLastError() != WSAEWOULDBLOCK) {
#else
if (errno != EWOULDBLOCK)
if (errno != EWOULDBLOCK) {
#endif
ERROR_LOG(IO, "Error reading from buffer: %i", retval);
return false;
return false;
}
// Just try again on a would block error, not a real error.
continue;
}
char *p = Append((size_t)retval);
memcpy(p, &buf[0], retval);