mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-24 21:29:49 +00:00
Retry on incomplete body (#5555)
This is an attempt to add https://github.com/astral-sh/uv/issues/3514#issuecomment-2253562096 to retrying. Relevant hyper code: *15cd6fa1fc/src/proto/h1/decode.rs (L683)*15cd6fa1fc/src/proto/h1/decode.rs (L161-L164)
This commit is contained in:
parent
24472108fe
commit
0877f76aae
1 changed files with 3 additions and 1 deletions
|
|
@ -290,7 +290,9 @@ fn is_extended_transient_error(res: &Result<Response, reqwest_middleware::Error>
|
|||
// Check for connection reset errors, these are usually `Body` errors which are not retried by default.
|
||||
if let Err(reqwest_middleware::Error::Reqwest(err)) = res {
|
||||
if let Some(io) = find_source::<std::io::Error>(&err) {
|
||||
if io.kind() == std::io::ErrorKind::ConnectionReset {
|
||||
if io.kind() == std::io::ErrorKind::ConnectionReset
|
||||
|| io.kind() == std::io::ErrorKind::UnexpectedEof
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue