From 65a22e5e809ecbd20b3475cd8644fdf7aa5e8490 Mon Sep 17 00:00:00 2001 From: Hirotaka Ikoma Date: Thu, 27 Feb 2020 00:38:50 +0900 Subject: [PATCH] Fix NPE in HouseKeeper.stopScavenging (#4604) * Fix NPE in HouseKeeper.stopScavenging Signed-off-by: Hirotaka Ikoma --- .../java/org/eclipse/jetty/server/session/HouseKeeper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/HouseKeeper.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/HouseKeeper.java index 670957caf24..17616b8c0a5 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/HouseKeeper.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/HouseKeeper.java @@ -158,8 +158,9 @@ public class HouseKeeper extends AbstractLifeCycle LOG.info("{} Stopped scavenging", _sessionIdManager.getWorkerName()); } _task = null; - if (_ownScheduler) + if (_ownScheduler && _scheduler != null) { + _ownScheduler = false; _scheduler.stop(); _scheduler = null; }