From 6a3220b5fe1524883e0e822e8a591c63ec3833a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Eckel?= Date: Wed, 15 May 2024 16:56:24 +0200 Subject: [PATCH] added termination clause for the scheduler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Eckel --- monitor/mqtt_monitor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/mqtt_monitor.go b/monitor/mqtt_monitor.go index 4648be3..096efd7 100644 --- a/monitor/mqtt_monitor.go +++ b/monitor/mqtt_monitor.go @@ -84,7 +84,7 @@ func (mms *MqttMonitor) runPeriodicTasks() { defer tickerRestablishConnection.Stop() defer tickerCleanup.Stop() - for { + for !mms.IsTerminated() { select { case <-tickerRestablishConnection.C: go mms.MonitorActiveParticipants()