From d94e07f376d39851a02487c9449c0f6358c95676 Mon Sep 17 00:00:00 2001 From: "xueli.xue" Date: Thu, 19 Nov 2020 20:32:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E5=B5=8C=E6=9C=8D=E5=8A=A1=E9=94=80?= =?UTF-8?q?=E6=AF=81=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xxl/job/core/executor/XxlJobExecutor.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java index 9c632a35..945fded4 100644 --- a/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java +++ b/xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java @@ -159,10 +159,12 @@ public class XxlJobExecutor { private void stopEmbedServer() { // stop provider factory - try { - embedServer.stop(); - } catch (Exception e) { - logger.error(e.getMessage(), e); + if (embedServer != null) { + try { + embedServer.stop(); + } catch (Exception e) { + logger.error(e.getMessage(), e); + } } }