From fce8453bd1119cff55fc2cc75e51e8c6cae238e3 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 29 Oct 2023 03:27:43 +0700 Subject: [PATCH] [FIX] Enable autoRefresh in default --- .../src/main/java/pro/gravit/launcher/request/Request.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java index a4cd20b0..d5c6fc47 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java @@ -36,7 +36,9 @@ public abstract class Request implements WebSocketRequ public static synchronized void startAutoRefresh() { if(!autoRefreshRunning) { - executorService = Executors.newSingleThreadScheduledExecutor(); + if(executorService == null) { + executorService = Executors.newSingleThreadScheduledExecutor(); + } executorService.scheduleAtFixedRate(() -> { try { restore(false, true);