diff --git a/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/starter/refresher/AbstractCoreThreadPoolDynamicRefresh.java b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/starter/refresher/AbstractCoreThreadPoolDynamicRefresh.java index cde16e0a..291cd716 100644 --- a/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/starter/refresher/AbstractCoreThreadPoolDynamicRefresh.java +++ b/hippo4j-spring-boot/hippo4j-core-spring-boot-starter/src/main/java/cn/hippo4j/core/starter/refresher/AbstractCoreThreadPoolDynamicRefresh.java @@ -256,14 +256,15 @@ public abstract class AbstractCoreThreadPoolDynamicRefresh implements ThreadPool ExecutorProperties beforeProperties = GlobalCoreThreadPoolManage.getProperties(properties.getThreadPoolId()); ThreadPoolExecutor executor = GlobalThreadPoolManage.getExecutorService(threadPoolId).getExecutor(); - if (!Objects.equals(beforeProperties.getCorePoolSize(), properties.getCorePoolSize())) { - executor.setCorePoolSize(properties.getCorePoolSize()); - } if (!Objects.equals(beforeProperties.getMaximumPoolSize(), properties.getMaximumPoolSize())) { executor.setMaximumPoolSize(properties.getMaximumPoolSize()); } + if (!Objects.equals(beforeProperties.getCorePoolSize(), properties.getCorePoolSize())) { + executor.setCorePoolSize(properties.getCorePoolSize()); + } + if (!Objects.equals(beforeProperties.getAllowCoreThreadTimeOut(), properties.getAllowCoreThreadTimeOut())) { executor.allowCoreThreadTimeOut(properties.getAllowCoreThreadTimeOut()); }