mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02:00
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:
1 parent
2adc3c668a
commit
dfe945710d
1 file changed
+7
-3
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user