diff --git a/src/main/java/com/zenith/Proxy.java b/src/main/java/com/zenith/Proxy.java index 58ea83baa..f52737d16 100644 --- a/src/main/java/com/zenith/Proxy.java +++ b/src/main/java/com/zenith/Proxy.java @@ -143,22 +143,22 @@ public void start() { SCHEDULED_EXECUTOR_SERVICE.scheduleAtFixedRate(this::handleActiveHoursTick, 1L, 1L, TimeUnit.MINUTES); // health check on proxy server state. SCHEDULED_EXECUTOR_SERVICE.scheduleAtFixedRate(this::serverHealthCheck, 5L, 5L, TimeUnit.MINUTES); - if (CONFIG.client.extra.sixHourReconnect) { - SCHEDULED_EXECUTOR_SERVICE.scheduleAtFixedRate(() -> { - try { - if (isOnlineOn2b2tForAtLeastDuration(Duration.ofSeconds(60))) { - long onlineSeconds = Instant.now().getEpochSecond() - connectTime.getEpochSecond(); - if (onlineSeconds > (21600 - (60 + ThreadLocalRandom.current().nextInt(120)))) { // 6 hrs - 60 seconds padding - this.disconnect(SYSTEM_DISCONNECT); - this.cancelAutoReconnect(); - this.connect(); - } - } - } catch (final Throwable e) { - DEFAULT_LOG.error("Error in reconnect executor service", e); - } - }, 0, 10L, TimeUnit.SECONDS); - } +// if (CONFIG.client.extra.sixHourReconnect) { +// SCHEDULED_EXECUTOR_SERVICE.scheduleAtFixedRate(() -> { +// try { +// if (isOnlineOn2b2tForAtLeastDuration(Duration.ofSeconds(60))) { +// long onlineSeconds = Instant.now().getEpochSecond() - connectTime.getEpochSecond(); +// if (onlineSeconds > (21600 - (60 + ThreadLocalRandom.current().nextInt(120)))) { // 6 hrs - 60 seconds padding +// this.disconnect(SYSTEM_DISCONNECT); +// this.cancelAutoReconnect(); +// this.connect(); +// } +// } +// } catch (final Throwable e) { +// DEFAULT_LOG.error("Error in reconnect executor service", e); +// } +// }, 0, 10L, TimeUnit.SECONDS); +// } if (CONFIG.client.extra.twentyMinuteReconnectIfStuck) { SCHEDULED_EXECUTOR_SERVICE.scheduleAtFixedRate(() -> { try { diff --git a/src/main/java/com/zenith/util/Config.java b/src/main/java/com/zenith/util/Config.java index 6717e56da..3b2a6d3da 100644 --- a/src/main/java/com/zenith/util/Config.java +++ b/src/main/java/com/zenith/util/Config.java @@ -61,7 +61,7 @@ public static final class Extra { public List friendsList = new ArrayList<>(); public boolean clientConnectionMessages = true; public boolean autoConnectOnLogin = true; - public boolean sixHourReconnect = true; +// public boolean sixHourReconnect = false; public boolean twentyMinuteReconnectIfStuck = true; public boolean prioBan2b2tCheck = true; public boolean prioStatusChangeMention = true;