Merge pull request #14935 from unknownbrackets/http-timeout

http: Fix timeout mid request
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2021-09-28 11:40:54 +02:00
commit ccc86f3a2d
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);