From 5074684466fae8d2e5cc08eb29ea0ff351e698e7 Mon Sep 17 00:00:00 2001 From: Ann Priestman Date: Fri, 17 Jul 2015 09:49:58 -0400 Subject: [PATCH] Prevent shutDown from being called on ingest pipelines that haven't started. --- .../autopsy/ingest/DataSourceIngestJob.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java index 895aa63e06..aac5349381 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java @@ -386,9 +386,11 @@ final class DataSourceIngestJob { // errors are likely redundant. while (!this.fileIngestPipelinesQueue.isEmpty()) { pipeline = this.fileIngestPipelinesQueue.poll(); - List shutDownErrors = pipeline.shutDown(); - if (!shutDownErrors.isEmpty()) { - logIngestModuleErrors(shutDownErrors); + if(pipeline.isRunning()){ + List shutDownErrors = pipeline.shutDown(); + if (!shutDownErrors.isEmpty()) { + logIngestModuleErrors(shutDownErrors); + } } } break; @@ -565,7 +567,9 @@ final class DataSourceIngestJob { List errors = new ArrayList<>(); while (!this.fileIngestPipelinesQueue.isEmpty()) { FileIngestPipeline pipeline = fileIngestPipelinesQueue.poll(); - errors.addAll(pipeline.shutDown()); + if(pipeline.isRunning()){ + errors.addAll(pipeline.shutDown()); + } } if (!errors.isEmpty()) { logIngestModuleErrors(errors);