Switch timeout APIs to use Duration.

This commit is contained in:
Jacob Hoffman-Andrews authored and Martin Algesten committed 2020-10-17 09:23:01 +02:00
1 parent 00e3294ac1
commit 257d4e54dd
3 files changed
+24 -34

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ type Result<T> = result::Result<T, Oops>;
fn get(agent: &ureq::Agent, url: &String) -> Result<Vec<u8>> {
let response = agent
.get(url)
.timeout_connect(5_000)
.timeout_connect(std::time::Duration::from_secs(5))
.timeout(Duration::from_secs(20))
.call();
if let Some(err) = response.synthetic_error() {