Fix alarm notification asynchronous thread pool factory error (#1377)

pull/1380/head
magestack 1 year ago committed by GitHub
parent 4248512d98
commit b1e181d5b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -75,8 +75,10 @@ public class DefaultThreadPoolCheckAlarmHandler implements Runnable, ThreadPoolC
private final AtomicInteger count = new AtomicInteger();
@Override
public Thread newThread(Runnable r) {
return new Thread("client.execute.timeout.alarm_" + count.incrementAndGet());
public Thread newThread(Runnable runnable) {
Thread thread = new Thread(runnable, "client.execute.timeout.alarm_" + count.incrementAndGet());
thread.setDaemon(true);
return thread;
}
},
new ThreadPoolExecutor.AbortPolicy());

Loading…
Cancel
Save