Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak the meaning of HTTP timeouts #1564

Merged
merged 2 commits into from
Apr 30, 2015
Merged

Conversation

alexcrichton
Copy link
Member

Previously a timeout was set via libcurl's blanket timeout option, which is a
timeout for the entire request. This isn't always what we want, however, as
cargo is used on quite a variety of networks. Instead what we really want is
timing out data being received, so instead of a blanket timeout we set two
different timeouts:

  • The connect timeout is now configured (time it takes to connect the socket)
  • A "low speed" timeout is now also set. This means that if Cargo doesn't
    receive 10 bytes of data in the specified tiemout period that the entire
    transfer will be timed out.

Closes #1560

Primarily pick up an update to curl-rust which transitively means we need to
update openssl for other deps
@alexcrichton
Copy link
Member Author

r? @brson

cc @wycats

@rust-highfive rust-highfive assigned brson and unassigned huonw Apr 29, 2015
@rust-highfive
Copy link

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@brson
Copy link
Contributor

brson commented Apr 29, 2015

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 29, 2015

📌 Commit 35b871c has been approved by brson

@bors
Copy link
Collaborator

bors commented Apr 29, 2015

⌛ Testing commit 35b871c with merge ceafa2b...

@bors
Copy link
Collaborator

bors commented Apr 29, 2015

💔 Test failed - cargo-win-32

@alexcrichton
Copy link
Member Author

@bors: r=brson c81e2e5

@bors
Copy link
Collaborator

bors commented Apr 29, 2015

⌛ Testing commit c81e2e5 with merge 83f4535...

@bors
Copy link
Collaborator

bors commented Apr 29, 2015

💔 Test failed - cargo-mac-64

@alexcrichton
Copy link
Member Author

@bors: r+ 90097a3

@bors
Copy link
Collaborator

bors commented Apr 29, 2015

⌛ Testing commit 90097a3 with merge 15f76b7...

@bors
Copy link
Collaborator

bors commented Apr 29, 2015

💔 Test failed - cargo-win-64

Previously a timeout was set via libcurl's blanket timeout option, which is a
timeout for the entire request. This isn't always what we want, however, as
cargo is used on quite a variety of networks. Instead what we really want is
timing out data being received, so instead of a blanket timeout we set two
different timeouts:

* The connect timeout is now configured (time it takes to connect the socket)
* A "low speed" timeout is now also set. This means that if Cargo doesn't
  receive 10 bytes of data in the specified tiemout period that the entire
  transfer will be timed out.

Closes rust-lang#1560
@alexcrichton
Copy link
Member Author

@bors: r=brson 923c2f2

bors added a commit that referenced this pull request Apr 30, 2015
Previously a timeout was set via libcurl's blanket timeout option, which is a
timeout for the entire request. This isn't always what we want, however, as
cargo is used on quite a variety of networks. Instead what we really want is
timing out data being received, so instead of a blanket timeout we set two
different timeouts:

* The connect timeout is now configured (time it takes to connect the socket)
* A "low speed" timeout is now also set. This means that if Cargo doesn't
  receive 10 bytes of data in the specified tiemout period that the entire
  transfer will be timed out.

Closes #1560
@bors
Copy link
Collaborator

bors commented Apr 30, 2015

⌛ Testing commit 923c2f2 with merge 91ea240...

@bors
Copy link
Collaborator

bors commented Apr 30, 2015

☀️ Test successful - cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-32, cargo-win-64

@bors bors merged commit 923c2f2 into rust-lang:master Apr 30, 2015
@alexcrichton alexcrichton deleted the right-timeout branch April 30, 2015 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't use a timeout on (working, currently running) downloads
5 participants