fix(awc): close connections after GO_AWAY local or remote GO_AWAY errors (#3790)

This commit is contained in:
Kevin Logan 2025-10-04 18:44:02 -06:00 committed by GitHub
parent fde7934243
commit 016841137e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -2,6 +2,8 @@
## Unreleased ## Unreleased
- Fix a bug where `GO_AWAY` errors did not stop connections from returning to the pool.
## 3.8.0 ## 3.8.0
- Add `hickory-dns` crate feature (off-by-default). - Add `hickory-dns` crate feature (off-by-default).

View File

@ -107,7 +107,7 @@ where
let res = poll_fn(|cx| io.poll_ready(cx)).await; let res = poll_fn(|cx| io.poll_ready(cx)).await;
if let Err(err) = res { if let Err(err) = res {
io.on_release(err.is_io()); io.on_release(err.is_io() || err.is_go_away());
return Err(SendRequestError::from(err)); return Err(SendRequestError::from(err));
} }
@ -121,7 +121,7 @@ where
fut.await.map_err(SendRequestError::from)? fut.await.map_err(SendRequestError::from)?
} }
Err(err) => { Err(err) => {
io.on_release(err.is_io()); io.on_release(err.is_io() || err.is_go_away());
return Err(err.into()); return Err(err.into());
} }
}; };