diff options
| author | 2023-01-06 10:00:09 -0500 | |
|---|---|---|
| committer | 2023-01-06 10:00:09 -0500 | |
| commit | 6d744901390c61ecebadfb1897a0a59064ecee04 (patch) | |
| tree | ff9ca482c1f3ebf52bcc07d8c6d396cd4a686ca0 | |
| parent | Merge pull request #9552 from liamwhite/turbo (diff) | |
| parent | net: Silently translate ETIMEDOUT network error (diff) | |
| download | yuzu-6d744901390c61ecebadfb1897a0a59064ecee04.tar.gz yuzu-6d744901390c61ecebadfb1897a0a59064ecee04.tar.xz yuzu-6d744901390c61ecebadfb1897a0a59064ecee04.zip | |
Merge pull request #9558 from MonsterDruide1/network-timeout-noerror
net: Silently translate ETIMEDOUT network error
Diffstat (limited to '')
| -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) { | |||
| 117 | return Errno::NETUNREACH; | 117 | return Errno::NETUNREACH; |
| 118 | case WSAEMSGSIZE: | 118 | case WSAEMSGSIZE: |
| 119 | return Errno::MSGSIZE; | 119 | return Errno::MSGSIZE; |
| 120 | case WSAETIMEDOUT: | ||
| 121 | return Errno::TIMEDOUT; | ||
| 120 | default: | 122 | default: |
| 121 | UNIMPLEMENTED_MSG("Unimplemented errno={}", e); | 123 | UNIMPLEMENTED_MSG("Unimplemented errno={}", e); |
| 122 | return Errno::OTHER; | 124 | return Errno::OTHER; |
| @@ -211,6 +213,8 @@ Errno TranslateNativeError(int e) { | |||
| 211 | return Errno::NETUNREACH; | 213 | return Errno::NETUNREACH; |
| 212 | case EMSGSIZE: | 214 | case EMSGSIZE: |
| 213 | return Errno::MSGSIZE; | 215 | return Errno::MSGSIZE; |
| 216 | case ETIMEDOUT: | ||
| 217 | return Errno::TIMEDOUT; | ||
| 214 | default: | 218 | default: |
| 215 | UNIMPLEMENTED_MSG("Unimplemented errno={}", e); | 219 | UNIMPLEMENTED_MSG("Unimplemented errno={}", e); |
| 216 | return Errno::OTHER; | 220 | return Errno::OTHER; |
| @@ -226,7 +230,7 @@ Errno GetAndLogLastError() { | |||
| 226 | int e = errno; | 230 | int e = errno; |
| 227 | #endif | 231 | #endif |
| 228 | const Errno err = TranslateNativeError(e); | 232 | const Errno err = TranslateNativeError(e); |
| 229 | if (err == Errno::AGAIN) { | 233 | if (err == Errno::AGAIN || err == Errno::TIMEDOUT) { |
| 230 | return err; | 234 | return err; |
| 231 | } | 235 | } |
| 232 | LOG_ERROR(Network, "Socket operation error: {}", Common::NativeErrorToString(e)); | 236 | LOG_ERROR(Network, "Socket operation error: {}", Common::NativeErrorToString(e)); |