stop fetching empty messages after 5 min

This commit is contained in:
MichaelDvP
2024-03-15 13:59:20 +01:00
parent 8a0152ebe6
commit 77ad209ce1

View File

@@ -1819,8 +1819,11 @@ bool EMSdevice::handle_telegram(std::shared_ptr<const Telegram> telegram) {
#if defined(EMSESP_DEBUG) #if defined(EMSESP_DEBUG)
EMSESP::logger().debug("This telegram (%s) is not recognized by the EMS bus", tf.telegram_type_name_); EMSESP::logger().debug("This telegram (%s) is not recognized by the EMS bus", tf.telegram_type_name_);
#endif #endif
// removing fetch causes issue: https://github.com/emsesp/EMS-ESP32/issues/1420 // removing fetch after start causes issue: https://github.com/emsesp/EMS-ESP32/issues/1420
// tf.fetch_ = false; // continue retry the first 5 minutes, then disable (added 15.3.2024)
if (uuid::get_uptime_sec() > 600) {
tf.fetch_ = false;
}
return false; return false;
} }
if (telegram->message_length > 0) { if (telegram->message_length > 0) {