From 5f647647b2683875bdbed970d955a9e5123284bd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 4 Sep 2023 10:57:49 +0200 Subject: Merging upstream version 1.42.2. Signed-off-by: Daniel Baumann --- ml/ml.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ml/ml.cc') 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); -- cgit v1.2.3