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:
teor 2021-01-15 16:23:19 +10:00 committed by Deirdre Connolly
parent 3a093cca39
commit 44c8fafc29
1 changed files with 1 additions and 0 deletions

View File

@ -840,6 +840,7 @@ where
if self.svc.ready_and().await.is_err() {
// Treat all service readiness errors as Overloaded
self.fail_with(PeerError::Overloaded);
return;
}
let rsp = match self.svc.call(req).await {