mirror of
				https://git.tardis.systems/mirrors/yuzu
				synced 2025-11-03 20:24:43 +01:00 
			
		
		
		
	Merge pull request #9558 from MonsterDruide1/network-timeout-noerror
net: Silently translate ETIMEDOUT network error
This commit is contained in:
		
						commit
						6d74490139
					
				@ -117,6 +117,8 @@ Errno TranslateNativeError(int e) {
 | 
				
			|||||||
        return Errno::NETUNREACH;
 | 
					        return Errno::NETUNREACH;
 | 
				
			||||||
    case WSAEMSGSIZE:
 | 
					    case WSAEMSGSIZE:
 | 
				
			||||||
        return Errno::MSGSIZE;
 | 
					        return Errno::MSGSIZE;
 | 
				
			||||||
 | 
					    case WSAETIMEDOUT:
 | 
				
			||||||
 | 
					        return Errno::TIMEDOUT;
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        UNIMPLEMENTED_MSG("Unimplemented errno={}", e);
 | 
					        UNIMPLEMENTED_MSG("Unimplemented errno={}", e);
 | 
				
			||||||
        return Errno::OTHER;
 | 
					        return Errno::OTHER;
 | 
				
			||||||
@ -211,6 +213,8 @@ Errno TranslateNativeError(int e) {
 | 
				
			|||||||
        return Errno::NETUNREACH;
 | 
					        return Errno::NETUNREACH;
 | 
				
			||||||
    case EMSGSIZE:
 | 
					    case EMSGSIZE:
 | 
				
			||||||
        return Errno::MSGSIZE;
 | 
					        return Errno::MSGSIZE;
 | 
				
			||||||
 | 
					    case ETIMEDOUT:
 | 
				
			||||||
 | 
					        return Errno::TIMEDOUT;
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        UNIMPLEMENTED_MSG("Unimplemented errno={}", e);
 | 
					        UNIMPLEMENTED_MSG("Unimplemented errno={}", e);
 | 
				
			||||||
        return Errno::OTHER;
 | 
					        return Errno::OTHER;
 | 
				
			||||||
@ -226,7 +230,7 @@ Errno GetAndLogLastError() {
 | 
				
			|||||||
    int e = errno;
 | 
					    int e = errno;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    const Errno err = TranslateNativeError(e);
 | 
					    const Errno err = TranslateNativeError(e);
 | 
				
			||||||
    if (err == Errno::AGAIN) {
 | 
					    if (err == Errno::AGAIN || err == Errno::TIMEDOUT) {
 | 
				
			||||||
        return err;
 | 
					        return err;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    LOG_ERROR(Network, "Socket operation error: {}", Common::NativeErrorToString(e));
 | 
					    LOG_ERROR(Network, "Socket operation error: {}", Common::NativeErrorToString(e));
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user