diff --git a/core/src/main/java/haveno/core/app/HavenoExecutable.java b/core/src/main/java/haveno/core/app/HavenoExecutable.java index cfa844b6..1a7434bc 100644 --- a/core/src/main/java/haveno/core/app/HavenoExecutable.java +++ b/core/src/main/java/haveno/core/app/HavenoExecutable.java @@ -48,7 +48,6 @@ import haveno.core.xmr.setup.WalletsSetup; import haveno.core.xmr.wallet.BtcWalletService; import haveno.core.xmr.wallet.XmrWalletService; import haveno.network.p2p.P2PService; -import haveno.network.p2p.network.Connection; import lombok.Getter; import lombok.extern.slf4j.Slf4j; @@ -363,10 +362,6 @@ public abstract class HavenoExecutable implements GracefulShutDownHandler, Haven injector.getInstance(P2PService.class).shutDown(() -> { log.info("Done shutting down OpenOfferManager, OfferBookService, and P2PService"); - // shut down connections pool - log.info("Shutting down connections"); - Connection.shutDownExecutor(30); - // shut down monero wallets and connections injector.getInstance(WalletsSetup.class).shutDownComplete.addListener((ov, o, n) -> { diff --git a/core/src/main/java/haveno/core/app/misc/ExecutableForAppWithP2p.java b/core/src/main/java/haveno/core/app/misc/ExecutableForAppWithP2p.java index 44a1e469..0fe88114 100644 --- a/core/src/main/java/haveno/core/app/misc/ExecutableForAppWithP2p.java +++ b/core/src/main/java/haveno/core/app/misc/ExecutableForAppWithP2p.java @@ -41,7 +41,6 @@ import haveno.core.xmr.wallet.BtcWalletService; import haveno.core.xmr.wallet.XmrWalletService; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.P2PService; -import haveno.network.p2p.network.Connection; import haveno.network.p2p.seed.SeedNodeRepository; import lombok.extern.slf4j.Slf4j; @@ -127,10 +126,6 @@ public abstract class ExecutableForAppWithP2p extends HavenoExecutable { injector.getInstance(P2PService.class).shutDown(() -> { log.info("Done shutting down OpenOfferManager, OfferBookService, and P2PService"); - // shut down connections pool - log.info("Shutting down connections"); - Connection.shutDownExecutor(30); - // shut down monero wallets and connections injector.getInstance(WalletsSetup.class).shutDownComplete.addListener((ov, o, n) -> { module.close(injector); diff --git a/p2p/src/main/java/haveno/network/p2p/network/Connection.java b/p2p/src/main/java/haveno/network/p2p/network/Connection.java index 809fb7c4..b807aab3 100644 --- a/p2p/src/main/java/haveno/network/p2p/network/Connection.java +++ b/p2p/src/main/java/haveno/network/p2p/network/Connection.java @@ -124,17 +124,6 @@ public class Connection implements HasCapabilities, Runnable, MessageListener { return SHUTDOWN_TIMEOUT; } - public static void shutDownExecutor(int timeoutSeconds) { - try { - EXECUTOR.shutdown(); - if (!EXECUTOR.awaitTermination(timeoutSeconds, TimeUnit.SECONDS)) EXECUTOR.shutdownNow(); - } catch (InterruptedException e) { - EXECUTOR.shutdownNow(); - e.printStackTrace(); - log.warn("Error shutting down connection executor: " + e.getMessage()); - } - }; - /////////////////////////////////////////////////////////////////////////////////////////// // Class fields ///////////////////////////////////////////////////////////////////////////////////////////