Skip to content

Commit

Permalink
bubble up Outbound Err's and Responses even if the peer disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
jxs committed Sep 18, 2024
1 parent 14789bd commit 5fa8c80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion beacon_node/lighthouse_network/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,10 @@ impl<E: EthSpec> Network<E> {
let peer_id = event.peer_id;

// Do not permit Inbound events from peers that are being disconnected, or RPC requests.
if !self.peer_manager().is_connected(&peer_id) {
if !self.peer_manager().is_connected(&peer_id)
&& (matches!(event.message, Err(HandlerErr::Inbound { .. }))
|| matches!(event.message, Ok(RPCReceived::Request(..))))
{
debug!(
self.log,
"Ignoring rpc message of disconnecting peer";
Expand Down

0 comments on commit 5fa8c80

Please sign in to comment.