mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] Use custom thread factory in autorefresh
This commit is contained in:
parent
fce8453bd1
commit
9e83e8bec8
1 changed files with 6 additions and 1 deletions
|
@ -37,7 +37,12 @@ public abstract class Request<R extends WebSocketEvent> implements WebSocketRequ
|
|||
public static synchronized void startAutoRefresh() {
|
||||
if(!autoRefreshRunning) {
|
||||
if(executorService == null) {
|
||||
executorService = Executors.newSingleThreadScheduledExecutor();
|
||||
executorService = Executors.newSingleThreadScheduledExecutor((t) -> {
|
||||
Thread thread = new Thread(t);
|
||||
thread.setName("AutoRefresh thread");
|
||||
thread.setDaemon(true);
|
||||
return thread;
|
||||
});
|
||||
}
|
||||
executorService.scheduleAtFixedRate(() -> {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue