From e5d2572537004c3b1b48e51ea8d299cd8503db81 Mon Sep 17 00:00:00 2001 From: bcoles Date: Sat, 4 Nov 2023 03:21:52 +1100 Subject: [PATCH] sf: allow 60 seconds for post-scan correlations to complete --- 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":