diff --git a/deny.toml b/deny.toml index cebf09a1..721cadef 100644 --- a/deny.toml +++ b/deny.toml @@ -41,9 +41,6 @@ skip-tree = [ # wait for primitive-types to upgrade { name = "proc-macro-crate", version = "=0.1.5" }, - # wait for rocksdb to upgrade - { name = "bindgen", version = "=0.64.0" }, - # wait for prost-build to upgrade { name = "prettyplease", version = "=0.1.25" }, diff --git a/zebra-network/src/peer/connection.rs b/zebra-network/src/peer/connection.rs index 8c585ee2..20429cc7 100644 --- a/zebra-network/src/peer/connection.rs +++ b/zebra-network/src/peer/connection.rs @@ -1253,6 +1253,10 @@ where ); self.update_state_metrics(format!("In::Req::{}", req.command())); + // Give the inbound service time to clear its queue, + // before sending the next inbound request. + tokio::task::yield_now().await; + if self.svc.ready().await.is_err() { // Treat all service readiness errors as Overloaded // TODO: treat `TryRecvError::Closed` in `Inbound::poll_ready` as a fatal error (#1655) @@ -1403,6 +1407,10 @@ where } debug!(state = %self.state, %req, %rsp, "sent Zebra response to peer"); + + // Give the inbound service time to clear its queue, + // before checking the connection for the next inbound or outbound request. + tokio::task::yield_now().await; } }