diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-01-06 16:00:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-06 16:00:09 +0100 |
commit | 6d744901390c61ecebadfb1897a0a59064ecee04 (patch) | |
tree | ff9ca482c1f3ebf52bcc07d8c6d396cd4a686ca0 /src | |
parent | Merge pull request #9552 from liamwhite/turbo (diff) | |
parent | net: Silently translate ETIMEDOUT network error (diff) | |
download | yuzu-6d744901390c61ecebadfb1897a0a59064ecee04.tar yuzu-6d744901390c61ecebadfb1897a0a59064ecee04.tar.gz yuzu-6d744901390c61ecebadfb1897a0a59064ecee04.tar.bz2 yuzu-6d744901390c61ecebadfb1897a0a59064ecee04.tar.lz yuzu-6d744901390c61ecebadfb1897a0a59064ecee04.tar.xz yuzu-6d744901390c61ecebadfb1897a0a59064ecee04.tar.zst yuzu-6d744901390c61ecebadfb1897a0a59064ecee04.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/internal_network/network.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/internal_network/network.cpp b/src/core/internal_network/network.cpp index 447fbffaa..282ea1ff9 100644 --- a/src/core/internal_network/network.cpp +++ b/src/core/internal_network/network.cpp @@ -117,6 +117,8 @@ Errno TranslateNativeError(int e) { return Errno::NETUNREACH; case WSAEMSGSIZE: return Errno::MSGSIZE; + case WSAETIMEDOUT: + return Errno::TIMEDOUT; default: UNIMPLEMENTED_MSG("Unimplemented errno={}", e); return Errno::OTHER; @@ -211,6 +213,8 @@ Errno TranslateNativeError(int e) { return Errno::NETUNREACH; case EMSGSIZE: return Errno::MSGSIZE; + case ETIMEDOUT: + return Errno::TIMEDOUT; default: UNIMPLEMENTED_MSG("Unimplemented errno={}", e); return Errno::OTHER; @@ -226,7 +230,7 @@ Errno GetAndLogLastError() { int e = errno; #endif const Errno err = TranslateNativeError(e); - if (err == Errno::AGAIN) { + if (err == Errno::AGAIN || err == Errno::TIMEDOUT) { return err; } LOG_ERROR(Network, "Socket operation error: {}", Common::NativeErrorToString(e)); |