added termination clause for the scheduler

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2024-05-15 16:56:24 +02:00
parent 3cd74ce683
commit 6a3220b5fe
No known key found for this signature in database

View File

@ -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()