Skip to content

Commit 0d79ba6

Browse files
committed
Auto merge of rust-lang#8553 - alexcrichton:more-maybe-spurious, r=ehuss
Flag git http errors as maybe spurious This showed up in rust-lang#8544 with an error message of "stream ended at an unexpected time; class=Http" which sounds like a spurious error. Termination of a network connection can happen at any time! For now try to assist in that error by adding another class of error to the list of maybe spurious errors.
2 parents 2d26633 + 39a22ff commit 0d79ba6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cargo/util/network.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ impl<'a> Retry<'a> {
3636
fn maybe_spurious(err: &Error) -> bool {
3737
if let Some(git_err) = err.downcast_ref::<git2::Error>() {
3838
match git_err.class() {
39-
git2::ErrorClass::Net | git2::ErrorClass::Os | git2::ErrorClass::Zlib => return true,
39+
git2::ErrorClass::Net
40+
| git2::ErrorClass::Os
41+
| git2::ErrorClass::Zlib
42+
| git2::ErrorClass::Http => return true,
4043
_ => (),
4144
}
4245
}

0 commit comments

Comments
 (0)