From 44c8fafc299d95f152f8405ed121d551680ab6b9 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 15 Jan 2021 16:23:19 +1000 Subject: [PATCH] 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 --- zebra-network/src/peer/connection.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zebra-network/src/peer/connection.rs b/zebra-network/src/peer/connection.rs index 36cdd0617..d834ce877 100644 --- a/zebra-network/src/peer/connection.rs +++ b/zebra-network/src/peer/connection.rs @@ -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 {