From a75ff31933bb2be0a2f59cfc28662b4c19606f9b Mon Sep 17 00:00:00 2001 From: Age Manning Date: Tue, 18 Jun 2024 16:08:59 +1000 Subject: [PATCH] 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) }