From 77ad209ce1553ce7403c8eb47e6fa1e99b924043 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Fri, 15 Mar 2024 13:59:20 +0100 Subject: [PATCH] stop fetching empty messages after 5 min --- src/emsdevice.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index 06254b663..7266d2364 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -1819,8 +1819,11 @@ bool EMSdevice::handle_telegram(std::shared_ptr telegram) { #if defined(EMSESP_DEBUG) EMSESP::logger().debug("This telegram (%s) is not recognized by the EMS bus", tf.telegram_type_name_); #endif - // removing fetch causes issue: https://github.com/emsesp/EMS-ESP32/issues/1420 - // tf.fetch_ = false; + // removing fetch after start causes issue: https://github.com/emsesp/EMS-ESP32/issues/1420 + // continue retry the first 5 minutes, then disable (added 15.3.2024) + if (uuid::get_uptime_sec() > 600) { + tf.fetch_ = false; + } return false; } if (telegram->message_length > 0) {