Follow-up to #59, which left out upstream's HTTP timeouts because net::with_timeouts already covers these clients. That was true for silent servers, but not for a transfer that stalls partway:
A stalled download waited out RECV_BODY, 30 minutes.
A stalled upload waited out its send budget, over two hours for the largest bodies.
This adds PER_READ and PER_WRITE, 5 minutes each, to with_timeouts. Both restart with every read or write, so a slow transfer that keeps moving isn't affected, and the whole-body budgets still apply. 5 minutes matches RECV_RESPONSE, so it doesn't cut the server's thinking time short. A timeout is retried like any other, and the retry tests in all four clients now cover both.
Checked
cargo test --locked: 1606 passed, 0 failed, 71 ignored. cargo fmt --check is clean.
Two new tests stall a real socket, one partway through a response body and one partway through an upload, and each gets the expected timeout.
The #[ignore]d live-server tests were not run.
Follow-up to #59, which left out upstream's HTTP timeouts because `net::with_timeouts` already covers these clients. That was true for silent servers, but not for a transfer that stalls partway:
- A stalled download waited out `RECV_BODY`, 30 minutes.
- A stalled upload waited out its send budget, over two hours for the largest bodies.
This adds `PER_READ` and `PER_WRITE`, 5 minutes each, to `with_timeouts`. Both restart with every read or write, so a slow transfer that keeps moving isn't affected, and the whole-body budgets still apply. 5 minutes matches `RECV_RESPONSE`, so it doesn't cut the server's thinking time short. A timeout is retried like any other, and the retry tests in all four clients now cover both.
**Checked**
- `cargo test --locked`: 1606 passed, 0 failed, 71 ignored. `cargo fmt --check` is clean.
- Two new tests stall a real socket, one partway through a response body and one partway through an upload, and each gets the expected timeout.
- The `#[ignore]`d live-server tests were not run.
A transfer that stalled partway waited out the budget for the whole body: 30 minutes for a download, over two hours for the largest uploads. ureq 3.5 can time each read and write separately, so a silent socket now fails after 5 minutes and is retried like any other timeout.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to #59, which left out upstream's HTTP timeouts because
net::with_timeoutsalready covers these clients. That was true for silent servers, but not for a transfer that stalls partway:RECV_BODY, 30 minutes.This adds
PER_READandPER_WRITE, 5 minutes each, towith_timeouts. Both restart with every read or write, so a slow transfer that keeps moving isn't affected, and the whole-body budgets still apply. 5 minutes matchesRECV_RESPONSE, so it doesn't cut the server's thinking time short. A timeout is retried like any other, and the retry tests in all four clients now cover both.Checked
cargo test --locked: 1606 passed, 0 failed, 71 ignored.cargo fmt --checkis clean.#[ignore]d live-server tests were not run.