diff --git a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java index c982a95540f..c1812ec6242 100644 --- a/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java +++ b/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/AutodetectCommunicator.java @@ -187,8 +187,8 @@ public class AutodetectCommunicator implements Closeable { try { processKilled = true; autoDetectResultProcessor.setProcessKilled(); - autodetectProcess.kill(); autodetectWorkerExecutor.shutdown(); + autodetectProcess.kill(); if (awaitCompletion) { try {