From d14a3ff8f89d767611f3c19ffcf9e16616303289 Mon Sep 17 00:00:00 2001 From: weihu Date: Mon, 28 Feb 2022 17:38:27 +0800 Subject: [PATCH] update getWebThreadPool --- .../starter/handler/web/AbstractWebThreadPoolService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/starter/handler/web/AbstractWebThreadPoolService.java b/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/starter/handler/web/AbstractWebThreadPoolService.java index c2297edd..f29868fb 100644 --- a/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/starter/handler/web/AbstractWebThreadPoolService.java +++ b/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/starter/handler/web/AbstractWebThreadPoolService.java @@ -38,9 +38,9 @@ public abstract class AbstractWebThreadPoolService implements WebThreadPoolServi public Executor getWebThreadPool() { if (executor == null) { synchronized (AbstractWebThreadPoolService.class) { - ApplicationContext applicationContext = ApplicationContextHolder.getInstance(); - WebServer webServer = ((WebServerApplicationContext) applicationContext).getWebServer(); if (executor == null) { + ApplicationContext applicationContext = ApplicationContextHolder.getInstance(); + WebServer webServer = ((WebServerApplicationContext) applicationContext).getWebServer(); executor = getWebThreadPoolByServer(webServer); } }