From f69ccc3b7089fc02630ddc7b15552fcc5d98f522 Mon Sep 17 00:00:00 2001 From: Age Manning Date: Wed, 19 Jun 2024 15:02:37 +1000 Subject: [PATCH] Ensure all handler events are covered (#5945) * Ensure handler events are covered --- beacon_node/lighthouse_network/src/rpc/handler.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/beacon_node/lighthouse_network/src/rpc/handler.rs b/beacon_node/lighthouse_network/src/rpc/handler.rs index 48f69c64c5..b7166efc37 100644 --- a/beacon_node/lighthouse_network/src/rpc/handler.rs +++ b/beacon_node/lighthouse_network/src/rpc/handler.rs @@ -374,6 +374,12 @@ where id: outbound_info.req_id, }))); } + + // Also handle any events that are awaiting to be sent to the behaviour + if !self.events_out.is_empty() { + return Poll::Ready(Some(self.events_out.remove(0))); + } + Poll::Ready(None) }