From 3923159c84d537fc32c757ef7d5cc301f5085187 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 10 Sep 2020 11:30:08 +0100 Subject: [PATCH] ameliorate awc timeouts on windows --- awc/CHANGES.md | 3 ++- awc/src/builder.rs | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/awc/CHANGES.md b/awc/CHANGES.md index 4a830b8fc..5bf283f06 100644 --- a/awc/CHANGES.md +++ b/awc/CHANGES.md @@ -1,7 +1,8 @@ # Changes ## Unreleased - 2020-xx-xx - +### Fixed +* Reduced chance of timeouts on Windows. ## 2.0.0-beta.4 - 2020-09-09 ### Changed diff --git a/awc/src/builder.rs b/awc/src/builder.rs index 7cd659c38..a90220ce4 100644 --- a/awc/src/builder.rs +++ b/awc/src/builder.rs @@ -40,7 +40,14 @@ impl ClientBuilder { allow_redirects: true, max_redirects: 10, headers: HeaderMap::new(), + + #[cfg(not(target_os = "windows"))] timeout: Some(Duration::from_secs(5)), + + // HACK: Issue #1560 - ameliorate connect timeouts from DNS lookups + #[cfg(target_os = "windows")] + timeout: Some(Duration::from_secs(10)), + connector: None, max_http_version: None, stream_window_size: None,