[FIX] Enable autoRefresh in default

This commit is contained in:
Gravita 2023-10-29 03:27:43 +07:00
parent 224649aa13
commit fce8453bd1

View file

@ -36,7 +36,9 @@ public abstract class Request<R extends WebSocketEvent> implements WebSocketRequ
public static synchronized void startAutoRefresh() { public static synchronized void startAutoRefresh() {
if(!autoRefreshRunning) { if(!autoRefreshRunning) {
executorService = Executors.newSingleThreadScheduledExecutor(); if(executorService == null) {
executorService = Executors.newSingleThreadScheduledExecutor();
}
executorService.scheduleAtFixedRate(() -> { executorService.scheduleAtFixedRate(() -> {
try { try {
restore(false, true); restore(false, true);