mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-03-12 09:31:15 +00:00
ignore task cancelled error in broadcast handler after shut down
This commit is contained in:
parent
e426f4d8f1
commit
1ac4c45f6d
1 changed files with 2 additions and 4 deletions
|
@ -277,9 +277,6 @@ public class BroadcastHandler implements PeerManager.Listener {
|
|||
|
||||
@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 @@ public class BroadcastHandler implements PeerManager.Listener {
|
|||
try {
|
||||
future.cancel(true);
|
||||
} catch (Exception e) {
|
||||
if (!networkNode.isShutDownStarted()) throw e;
|
||||
if (networkNode.isShutDownStarted()) return; // ignore if shut down
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
sendMessageFutures.clear();
|
||||
|
|
Loading…
Reference in a new issue