diff --git a/crates/net/eth-wire/src/p2pstream.rs b/crates/net/eth-wire/src/p2pstream.rs index 1fe45c803e..c21db5fdc7 100644 --- a/crates/net/eth-wire/src/p2pstream.rs +++ b/crates/net/eth-wire/src/p2pstream.rs @@ -339,6 +339,10 @@ where let id = *bytes.first().ok_or(P2PStreamError::EmptyProtocolMessage)?; match id { _ if id == P2PMessageID::Ping as u8 => { + if this.outgoing_messages.len() > MAX_P2P_CAPACITY { + return Poll::Ready(Some(Err(P2PStreamError::SendBufferFull))) + } + tracing::trace!("Received Ping, Sending Pong"); this.send_pong(); }