From 1a9bcd79ef39fa93182373a9de915f3df6f9613a Mon Sep 17 00:00:00 2001 From: bcoles Date: Mon, 6 Nov 2023 05:35:29 +1100 Subject: [PATCH] sf: allow 60 seconds for post-scan correlations to complete (#1818) --- sf.py | 7 +++++++ 1 file changed, 7 insertions(+) mode change 100755 => 100644 sf.py diff --git a/sf.py b/sf.py old mode 100755 new mode 100644 index b59b6c95f4..b16f2df939 --- a/sf.py +++ b/sf.py @@ -442,6 +442,13 @@ def start_scan(sfConfig: dict, sfModules: dict, args, loggingQueue) -> None: if not info: continue if info[5] in ["ERROR-FAILED", "ABORT-REQUESTED", "ABORTED", "FINISHED"]: + # allow 60 seconds for post-scan correlations to complete + timeout = 60 + p.join(timeout=timeout) + if (p.is_alive()): + log.error(f"Timeout reached ({timeout}s) waiting for scan {scanId} post-processing to complete.") + sys.exit(-1) + if sfConfig['__logging']: log.info(f"Scan completed with status {info[5]}") if args.o == "json":