Fix issue where, if a shutdown request was sent while parsing static reference data, the program would continue parsing. #118

This commit is contained in:
Ian Renton
2026-08-02 08:01:25 +01:00
parent 5bfe480f7c
commit 0b0c8aa4f3
22 changed files with 117 additions and 8 deletions
+8
View File
@@ -23,10 +23,18 @@ class K0SWE(FileDownloadStaticDataProvider):
for dxcc in dxcc_list:
dxcc_map[dxcc["entityCode"]] = dxcc
# Bail out if a stop has been requested, i.e. the program is shutting down - no need to parse the rest
# of the data in this case
if self._stop_event.is_set():
break
# Add to data store
for k, v in dxcc_map.items():
DATA_STORE.dxcc_data[k] = v
if self._stop_event.is_set():
break
# Regenerate in-memory regex-to-DXCC-entity-code map.
DATA_STORE.regenerateCallRegexToDXCCEntityMap()