mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
fixes for cancellation
This commit is contained in:
parent
2dd82a21ea
commit
e3353b2916
@ -639,10 +639,8 @@ public class MalwareScanIngestModule implements FileIngestModule {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ingestJobState
|
||||
* @param md5objIdMapping
|
||||
* @return
|
||||
* Does long polling for any pending results.
|
||||
* @param ingestJobState The state of the ingest job.
|
||||
* @throws InterruptedException
|
||||
* @throws CTCloudException
|
||||
* @throws org.sleuthkit.datamodel.Blackboard.BlackboardException
|
||||
@ -696,7 +694,13 @@ public class MalwareScanIngestModule implements FileIngestModule {
|
||||
}
|
||||
|
||||
// exponential backoff before trying again
|
||||
Thread.sleep(FILE_UPLOAD_RETRY_SLEEP_MILLIS * ((long) Math.pow(2, retry)));
|
||||
long waitMultiplier = ((long) Math.pow(2, retry));
|
||||
for (int i = 0; i < waitMultiplier; i++) {
|
||||
if (ingestJobState.getIngestJobContext().fileIngestIsCancelled()) {
|
||||
return;
|
||||
}
|
||||
Thread.sleep(FILE_UPLOAD_RETRY_SLEEP_MILLIS);
|
||||
}
|
||||
}
|
||||
|
||||
notifyWarning(
|
||||
|
Loading…
x
Reference in New Issue
Block a user