diff --git a/src/cargo/util/network.rs b/src/cargo/util/network.rs index 0850e8b5241..48f8f0baef0 100644 --- a/src/cargo/util/network.rs +++ b/src/cargo/util/network.rs @@ -36,7 +36,10 @@ impl<'a> Retry<'a> { fn maybe_spurious(err: &Error) -> bool { if let Some(git_err) = err.downcast_ref::() { match git_err.class() { - git2::ErrorClass::Net | git2::ErrorClass::Os | git2::ErrorClass::Zlib => return true, + git2::ErrorClass::Net + | git2::ErrorClass::Os + | git2::ErrorClass::Zlib + | git2::ErrorClass::Http => return true, _ => (), } }