add early return (#2486)

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
pull/2487/head
Ratan (Rai) Sur 3 years ago committed by GitHub
parent d5300771b1
commit d48c95e97a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManager.java

@ -238,6 +238,7 @@ public class EthProtocolManager implements ProtocolManager, MinedBlockObserver {
if (message.getData().getSize() > 10 * 1_000_000 /*10MB*/) { if (message.getData().getSize() > 10 * 1_000_000 /*10MB*/) {
LOG.debug("Received message over 10MB. Disconnecting from {}", peer); LOG.debug("Received message over 10MB. Disconnecting from {}", peer);
peer.disconnect(DisconnectReason.BREACH_OF_PROTOCOL); peer.disconnect(DisconnectReason.BREACH_OF_PROTOCOL);
return;
} }
// Handle STATUS processing // Handle STATUS processing

Loading…
Cancel
Save