increase whirlpool http client timeout

This commit is contained in:
Craig Raw 2024-02-16 07:58:46 +02:00
parent 521bbdd70e
commit 3f72a84afe

View file

@ -58,6 +58,7 @@ public class Whirlpool {
public static final List<Network> WHIRLPOOL_NETWORKS = List.of(Network.MAINNET, Network.TESTNET); public static final List<Network> WHIRLPOOL_NETWORKS = List.of(Network.MAINNET, Network.TESTNET);
public static final int DEFAULT_MIXTO_MIN_MIXES = 3; public static final int DEFAULT_MIXTO_MIN_MIXES = 3;
public static final int DEFAULT_MIXTO_RANDOM_FACTOR = 4; public static final int DEFAULT_MIXTO_RANDOM_FACTOR = 4;
protected static final int TIMEOUT_MS = 60000;
private final WhirlpoolServer whirlpoolServer; private final WhirlpoolServer whirlpoolServer;
private final JavaHttpClientService httpClientService; private final JavaHttpClientService httpClientService;
@ -84,7 +85,7 @@ public class Whirlpool {
public Whirlpool(Network network, HostAndPort torProxy) { public Whirlpool(Network network, HostAndPort torProxy) {
this.whirlpoolServer = WhirlpoolServer.valueOf(network.getName().toUpperCase(Locale.ROOT)); this.whirlpoolServer = WhirlpoolServer.valueOf(network.getName().toUpperCase(Locale.ROOT));
this.httpClientService = new JavaHttpClientService(torProxy); this.httpClientService = new JavaHttpClientService(torProxy, TIMEOUT_MS);
this.stompClientService = new JavaStompClientService(httpClientService); this.stompClientService = new JavaStompClientService(httpClientService);
this.torClientService = new SparrowTorClientService(this); this.torClientService = new SparrowTorClientService(this);