summaryrefslogtreecommitdiffstats
path: root/ml/ml.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-04 08:57:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-04 08:57:49 +0000
commit5f647647b2683875bdbed970d955a9e5123284bd (patch)
tree66dcf1d9f7a60cd19dd9ac410e27d5f6ead521d3 /ml/ml.cc
parentReleasing debian version 1.42.1-1. (diff)
downloadnetdata-5f647647b2683875bdbed970d955a9e5123284bd.tar.xz
netdata-5f647647b2683875bdbed970d955a9e5123284bd.zip
Merging upstream version 1.42.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/ml.cc')
-rw-r--r--ml/ml.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/ml/ml.cc b/ml/ml.cc
index 39696749..75f2e727 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);