Merge pull request #13331 from unknownbrackets/debugger

http: Avoid logging errors for would block
This commit is contained in:
Henrik Rydgård 2020-08-24 07:18:07 +02:00 committed by GitHub
commit f7283ee993
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,7 @@
#endif
#include <algorithm>
#include <cerrno>
#include <cstdarg>
#include "net/sinks.h"
@ -185,6 +186,14 @@ bool InputSink::Block() {
void InputSink::AccountFill(int bytes) {
if (bytes < 0) {
#if PPSSPP_PLATFORM(WINDOWS)
int err = WSAGetLastError();
if (err == WSAEWOULDBLOCK)
return;
#else
if (errno == EWOULDBLOCK || errno == EAGAIN)
return;
#endif
ERROR_LOG(IO, "Error reading from socket");
return;
}