From 259502829e0a297cabb04377b5562c0bc9674acd Mon Sep 17 00:00:00 2001 From: divma Date: Wed, 24 Jun 2020 02:44:28 -0500 Subject: [PATCH] fix wrong draining of queued requests on handler shutdown (#1288) --- beacon_node/eth2_libp2p/src/rpc/handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_node/eth2_libp2p/src/rpc/handler.rs b/beacon_node/eth2_libp2p/src/rpc/handler.rs index e08375703..ea90fafad 100644 --- a/beacon_node/eth2_libp2p/src/rpc/handler.rs +++ b/beacon_node/eth2_libp2p/src/rpc/handler.rs @@ -326,7 +326,7 @@ where if matches!(self.state, HandlerState::Active) { debug!(self.log, "Starting handler shutdown"; "unsent_queued_requests" => self.dial_queue.len()); // we now drive to completion communications already dialed/established - for (id, req) in self.dial_queue.pop() { + while let Some((id, req)) = self.dial_queue.pop() { self.pending_errors.push(HandlerErr::Outbound { id, proto: req.protocol(),