Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
facilitator: GCS timeouts! Again!
Browse files Browse the repository at this point in the history
I missed a couple spots where we set timeouts on `ureq::Request`s in
`transport/gcs.rs` due to inattention.
  • Loading branch information
tgeoghegan committed Feb 18, 2021
1 parent f81d354 commit 88326ba
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions facilitator/src/transport/gcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(()),
Expand Down

0 comments on commit 88326ba

Please sign in to comment.