fix(client): retry when pool checkout returns closed HTTP2 connection (#2585)

When http2_only is true, we never try to open a new connection if there
is one open already, which means that if the existing connection that
gets checked out of the pool is closed, then the request won't happen.
This commit is contained in:
Anthony Ramine
2021-07-21 02:06:09 +02:00
committed by GitHub
parent 5243570137
commit 52214f391c
3 changed files with 53 additions and 13 deletions

View File

@@ -214,7 +214,7 @@ impl Error {
&self.inner.kind
}
fn find_source<E: StdError + 'static>(&self) -> Option<&E> {
pub(crate) fn find_source<E: StdError + 'static>(&self) -> Option<&E> {
let mut cause = self.source();
while let Some(err) = cause {
if let Some(ref typed) = err.downcast_ref() {