From 70057419d8f5d3621a204ea593014c932e9cd039 Mon Sep 17 00:00:00 2001 From: Jason Frame Date: Fri, 21 Jun 2024 13:35:35 +1000 Subject: [PATCH] inc stacktrace on disconnect Signed-off-by: Jason Frame --- .../besu/ethereum/eth/manager/EthProtocolManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 c8781e73e3c..f0ab23efd69 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 @@ -427,7 +427,7 @@ public void handleDisconnect( final boolean initiatedByPeer) { final boolean wasActiveConnection = ethPeers.registerDisconnect(connection); LOG.atDebug() - .setMessage("Disconnect - active Connection? {} - {} - {} {} - {} {} - {} peers left") + .setMessage("Disconnect - active Connection? {} - {} - {} {} - {} {} - {} peers left, stack {}") .addArgument(wasActiveConnection) .addArgument(initiatedByPeer ? "Inbound" : "Outbound") .addArgument(reason::getValue) @@ -435,6 +435,7 @@ public void handleDisconnect( .addArgument(() -> connection.getPeer().getLoggableId()) .addArgument(() -> connection.getPeerInfo().getClientId()) .addArgument(ethPeers::peerCount) + .addArgument(Thread.currentThread().getStackTrace()) .log(); LOG.atTrace().setMessage("{}").addArgument(ethPeers::toString).log(); }