Stop processing the request after failing an overloaded connection
zebra-network's Connection expects that `fail_with` is only called once per connection, but the overload handling code continues to process the current request after an overload error, potentially leading to further failures. Closes #1599
This commit is contained in:
parent
3a093cca39
commit
44c8fafc29
|
@ -840,6 +840,7 @@ where
|
||||||
if self.svc.ready_and().await.is_err() {
|
if self.svc.ready_and().await.is_err() {
|
||||||
// Treat all service readiness errors as Overloaded
|
// Treat all service readiness errors as Overloaded
|
||||||
self.fail_with(PeerError::Overloaded);
|
self.fail_with(PeerError::Overloaded);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let rsp = match self.svc.call(req).await {
|
let rsp = match self.svc.call(req).await {
|
||||||
|
|
Loading…
Reference in New Issue