From 5aded98cec022611558af88662b5450079380526 Mon Sep 17 00:00:00 2001
From: Greg DiCristofaro <gregd@basistech.com>
Date: Mon, 7 Aug 2023 10:45:33 -0400
Subject: [PATCH] dont check for file uploads if out of hash lookups

---
 .../autopsy/malwarescan/MalwareScanIngestModule.java           | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Core/src/com/basistech/df/cybertriage/autopsy/malwarescan/MalwareScanIngestModule.java b/Core/src/com/basistech/df/cybertriage/autopsy/malwarescan/MalwareScanIngestModule.java
index 2d73effa5c..1d5871af3b 100644
--- a/Core/src/com/basistech/df/cybertriage/autopsy/malwarescan/MalwareScanIngestModule.java
+++ b/Core/src/com/basistech/df/cybertriage/autopsy/malwarescan/MalwareScanIngestModule.java
@@ -730,9 +730,10 @@ private void longPollForNotFound(IngestJobState ingestJobState) throws Interrupt
                 // exponential backoff before trying again
                 long waitMultiplier = ((long) Math.pow(2, retry));
                 for (int i = 0; i < waitMultiplier; i++) {
-                    if (ingestJobState.getIngestJobContext().fileIngestIsCancelled()) {
+                    if (!ingestJobState.isDoFileLookups() || ingestJobState.getIngestJobContext().fileIngestIsCancelled()) {
                         return;
                     }
+                    
                     Thread.sleep(FILE_UPLOAD_RETRY_SLEEP_MILLIS);
                 }
             }
-- 
GitLab