From 53ef534567e218ddac8dece3196b82d407b3a3d4 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 24 Nov 2014 21:06:47 +0100 Subject: [PATCH] No need to clear the scheduler when it is going to be shut down. Original commit: elastic/x-pack-elasticsearch@5e8e4134eefb8dd8dd4fb8bbeea72761ecff910d --- .../org/elasticsearch/alerts/scheduler/AlertScheduler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/elasticsearch/alerts/scheduler/AlertScheduler.java b/src/main/java/org/elasticsearch/alerts/scheduler/AlertScheduler.java index 4adfa4464b9..d5506e4cdd4 100644 --- a/src/main/java/org/elasticsearch/alerts/scheduler/AlertScheduler.java +++ b/src/main/java/org/elasticsearch/alerts/scheduler/AlertScheduler.java @@ -72,11 +72,11 @@ public class AlertScheduler extends AbstractComponent { */ public synchronized void stop() { try { + Scheduler scheduler = this.scheduler; if (scheduler != null) { logger.info("Stopping scheduler..."); - scheduler.clear(); scheduler.shutdown(true); - scheduler = null; + this.scheduler = null; logger.info("Stopped scheduler"); } } catch (SchedulerException se){