From 1ac4c45f6d3e4e1d9977a232c27334b13847a701 Mon Sep 17 00:00:00 2001 From: woodser Date: Wed, 8 Jan 2025 21:14:40 -0500 Subject: [PATCH] ignore task cancelled error in broadcast handler after shut down --- .../java/haveno/network/p2p/peers/BroadcastHandler.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/p2p/src/main/java/haveno/network/p2p/peers/BroadcastHandler.java b/p2p/src/main/java/haveno/network/p2p/peers/BroadcastHandler.java index fca906ff1cd..9320f978cd5 100644 --- a/p2p/src/main/java/haveno/network/p2p/peers/BroadcastHandler.java +++ b/p2p/src/main/java/haveno/network/p2p/peers/BroadcastHandler.java @@ -277,9 +277,6 @@ public void onSuccess(Connection connection) { @Override public void onFailure(@NotNull Throwable throwable) { - log.warn("Broadcast to " + connection.getPeersNodeAddressOptional() + " failed. ", throwable); - numOfFailedBroadcasts.incrementAndGet(); - if (stopped.get()) { return; } @@ -356,7 +353,8 @@ private void cleanup() { try { future.cancel(true); } catch (Exception e) { - if (!networkNode.isShutDownStarted()) throw e; + if (networkNode.isShutDownStarted()) return; // ignore if shut down + throw e; } }); sendMessageFutures.clear();