do not shut down connection pool in case account is re-recreated
This commit is contained in:
parent
c7b8571842
commit
1dab218d7e
@ -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) -> {
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user