[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() {
if(!autoRefreshRunning) {
if(executorService == null) {
executorService = Executors.newSingleThreadScheduledExecutor();
}
executorService.scheduleAtFixedRate(() -> {
try {
restore(false, true);