2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

network: GetAndLogLastError: ignore Errno::AGAIN

If non-blocking sockets are used, they generate a lot of Errno::AGAIN errors when they didn't receive any data. These errors shouldn't be logged.
This commit is contained in:
Sönke Holz 2021-08-07 02:54:25 +02:00
parent dd5c41b5a6
commit ddeb8d854e

View file

@ -227,8 +227,12 @@ Errno GetAndLogLastError() {
#else #else
int e = errno; int e = errno;
#endif #endif
const Errno err = TranslateNativeError(e);
if (err == Errno::AGAIN) {
return err;
}
LOG_ERROR(Network, "Socket operation error: {}", NativeErrorToString(e)); LOG_ERROR(Network, "Socket operation error: {}", NativeErrorToString(e));
return TranslateNativeError(e); return err;
} }
int TranslateDomain(Domain domain) { int TranslateDomain(Domain domain) {