Skip to content

Commit

Permalink
Don't set low speed limits for curl
Browse files Browse the repository at this point in the history
On some country, the network might be very slow occasionally. Setting
"low speed limit" and "low speed time" will make rustup fail nearly all
the time. Removing the settings will make rustup work on the unstable
networks.

This fixed rust-lang#902 .
  • Loading branch information
grissiom authored and nodakai committed Apr 23, 2017
1 parent d73b39e commit 05a1386
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/download/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ pub mod curl {
// Take at most 30s to connect
try!(handle.connect_timeout(Duration::new(30, 0)).chain_err(|| "failed to set connect timeout"));

// Fail if less than 10 bytes are transferred every 30 seconds
try!(handle.low_speed_limit(10).chain_err(|| "failed to set low speed limit"));
try!(handle.low_speed_time(Duration::new(30, 0)).chain_err(|| "failed to set low speed time"));

{
let cberr = RefCell::new(None);
let mut transfer = handle.transfer();
Expand Down

0 comments on commit 05a1386

Please sign in to comment.