| 72 | #ifdef _WIN32 |
| 73 | |
| 74 | static bool is_timeout_error(DWORD err) { |
| 75 | return err == ERROR_WINHTTP_TIMEOUT // 12002 |
| 76 | || err == ERROR_WINHTTP_CANNOT_CONNECT // sometimes surfaces with timeouts |
| 77 | || err == ERROR_WINHTTP_CONNECTION_ERROR // 12030 (often due to handshake timeout) |
| 78 | || err == ERROR_WINHTTP_NAME_NOT_RESOLVED // DNS timeout-like |
| 79 | || err == ERROR_WINHTTP_CANNOT_CONNECT // connect timeout-like |
| 80 | || err == WAIT_TIMEOUT; |
| 81 | } |
| 82 | |
| 83 | static std::string fetch_path_with_timeout_flag(HINTERNET hSession, |
| 84 | const wchar_t* host, |
no outgoing calls
no test coverage detected