diff --git a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManager.java b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManager.java index 364b292522..df1ee33d48 100644 --- a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManager.java +++ b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManager.java @@ -425,16 +425,18 @@ public class EthProtocolManager implements ProtocolManager, MinedBlockObserver { final PeerConnection connection, final DisconnectReason reason, final boolean initiatedByPeer) { - if (ethPeers.registerDisconnect(connection)) { - LOG.atDebug() - .setMessage("Disconnect - {} - {} - {} - {} peers left") - .addArgument(initiatedByPeer ? "Inbound" : "Outbound") - .addArgument(reason::toString) - .addArgument(() -> connection.getPeer().getLoggableId()) - .addArgument(ethPeers::peerCount) - .log(); - LOG.atTrace().setMessage("{}").addArgument(ethPeers::toString).log(); - } + final boolean wasActiveConnection = ethPeers.registerDisconnect(connection); + LOG.atDebug() + .setMessage("Disconnect - active Connection? {} - {} - {} {} - {} {} - {} peers left") + .addArgument(wasActiveConnection) + .addArgument(initiatedByPeer ? "Inbound" : "Outbound") + .addArgument(reason::getValue) + .addArgument(reason::name) + .addArgument(() -> connection.getPeer().getLoggableId()) + .addArgument(() -> connection.getPeerInfo().getClientId()) + .addArgument(ethPeers::peerCount) + .log(); + LOG.atTrace().setMessage("{}").addArgument(ethPeers::toString).log(); } private void handleStatusMessage(final EthPeer peer, final Message message) {