diff --git a/tasmota/tasmota_support/support.ino b/tasmota/tasmota_support/support.ino index 8966df9f2..766a821dc 100755 --- a/tasmota/tasmota_support/support.ino +++ b/tasmota/tasmota_support/support.ino @@ -2570,6 +2570,15 @@ uint32_t HighestLogLevel() { } void AddLog(uint32_t loglevel, PGM_P formatP, ...) { +#ifdef ESP32 + if (xPortInIsrContext()) { + // When called from an ISR, you should not send out logs. + // Allocating memory from within an ISR is a big no-no. + // Also long-time blocking like sending logs (especially to a syslog server) + // is also really not a good idea from an ISR call. + return; + } +#endif uint32_t highest_loglevel = HighestLogLevel(); // If no logging is requested then do not access heap to fight fragmentation