Closed jrepp closed 1 year ago
Thanks for this PR and sorry for such a late response. We somehow missed this and in the meantime a support for custom event id was implemented. It seems to me that these events could be used to both init the WDT (as it's executed from the mqtt task context), as well as to update it.
Please check if https://github.com/espressif/esp-mqtt/commit/97503cceb3eac8bb341e55e4a876cd7c1f3ae29b could be used
That looks workable and happy to close this PR. It turns out to be pretty useful in a production setting, but I'm sure other people can figure out how to implement it themselves.
When the ESP MQTT client calls into user code it's possible to encounter deadlocks related to user locking or scheduling problems. The task watchdog timer is a failsafe that helps detect and restart the device in the presence of these types of problems.