Commit 4a1813f
authored
Extract IO errors from h2 for streaming retries of Connection Reset (#15675)
Our streaming retries were missing connection reset errors as h2 was
shadowing IO errors (hyperium/h2#862).
**Test plan**
In one terminal:
```
cargo python uninstall 3.12 && cargo run python install 3.12 -vv
```
In another:
```
sudo tcpkill -i wlp2s0 port 443
```
Output:
```
error: Failed to install cpython-3.12.11-linux-x86_64-gnu
Caused by: Request failed after 3 retries
Caused by: Failed to download https://github.com/astral-sh/python-build-standalone/releases/download/20250902/cpython-3.12.11%2B20250902-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
Caused by: error sending request for url (https://github.com/astral-sh/python-build-standalone/releases/download/20250902/cpython-3.12.11%2B20250902-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz)
Caused by: client error (SendRequest)
Caused by: connection error
Caused by: connection reset
```
I don't know how to test that from inside Rust.
Fix #14171 (again, hopefully)1 parent 580bc9d commit 4a1813f
3 files changed
Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
986 | | - | |
| 986 | + | |
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
| |||
1027 | 1027 | | |
1028 | 1028 | | |
1029 | 1029 | | |
1030 | | - | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
1031 | 1036 | | |
1032 | 1037 | | |
1033 | 1038 | | |
| |||
0 commit comments