-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Currently two classes in the receiver application make use of Ticker-based timers. One is used for Telegram polling and another for detecting mailbox messaging timeouts. Both use long or blocking calls (network, filesystem), whereas ESP Ticker documentation explicitly warns against that. It is believed to be source of observed instabilities when a Telegram poll via Ticker collides with a need to send a message to Telegram from user space code. This could result in interrupted SSL processing leading to lack of memory and crash. The fix would be to replace Ticker-based timers with absolute time-based timers from ESP DS-System.
In this case the reentry guard in the Telegram class would not be needed anymore, as polling execution would be fully user-space with a single thread, so reentry would not be possible.