From 88326ba65dd983ae91d4b3068e1726f7133f7e37 Mon Sep 17 00:00:00 2001 From: Tim Geoghegan Date: Wed, 17 Feb 2021 17:29:50 -0800 Subject: [PATCH] facilitator: GCS timeouts! Again! I missed a couple spots where we set timeouts on `ureq::Request`s in `transport/gcs.rs` due to inattention. --- facilitator/src/transport/gcs.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/facilitator/src/transport/gcs.rs b/facilitator/src/transport/gcs.rs index e48650728..48545c379 100644 --- a/facilitator/src/transport/gcs.rs +++ b/facilitator/src/transport/gcs.rs @@ -233,9 +233,7 @@ impl StreamingTransferWriter { let http_response = ureq::put(&self.upload_session_uri) .set("Content-Range", &content_range) // By default, ureq will wait forever to connect or read - .timeout_connect(10_000) // ten seconds - .timeout_read(120_000) // two minutes - .timeout_write(120_000) // two minutes + .timeout(Duration::from_secs(120)) // two minutes .send_bytes(body); // On success we expect HTTP 308 Resume Incomplete and a Range: header, @@ -332,8 +330,7 @@ impl TransportWriter for StreamingTransferWriter { let http_response = ureq::delete(&self.upload_session_uri) .set("Content-Length", "0") // By default, ureq will wait forever to connect or read - .timeout_connect(10_000) // ten seconds - .timeout_read(120_000) // two minutes + .timeout(Duration::from_secs(120)) // two minutes .call(); match http_response.status() { 499 => Ok(()),