summaryrefslogtreecommitdiffstats
path: root/ml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-04 08:57:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-04 08:57:43 +0000
commit42ad44d1fea072d23f2e0067bca4ba6bc0b2a523 (patch)
treeb1c1459c6914f1d4c5b123b601b9dbecb049360c /ml
parentAdding upstream version 1.42.1. (diff)
downloadnetdata-42ad44d1fea072d23f2e0067bca4ba6bc0b2a523.tar.xz
netdata-42ad44d1fea072d23f2e0067bca4ba6bc0b2a523.zip
Adding upstream version 1.42.2.upstream/1.42.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml')
-rw-r--r--ml/ml.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/ml/ml.cc b/ml/ml.cc
index 396967492..75f2e727a 100644
--- a/ml/ml.cc
+++ b/ml/ml.cc
@@ -1725,6 +1725,9 @@ void ml_stop_threads()
Cfg.detection_stop = true;
Cfg.training_stop = true;
+ if (!Cfg.detection_thread)
+ return;
+
netdata_thread_cancel(Cfg.detection_thread);
netdata_thread_join(Cfg.detection_thread, NULL);