I have a device running 24/7 connected to Telegram. After a few days of operation, I usually find the device frozen in the morning. After troubleshooting, I identified that the issue occurs with the sendMessage call, which hangs (does not return) and eventually causes the device to lock up.
This is the function I am using:
void SendTelegram(const char* text, bool HTML = false) {
TBMessage msg;
msg.sender.id = 0;
msg.chatId = CHAN_ID;
msg.isHTMLenabled = HTML;
myBot.sendMessage(msg, text);
yield();
}
I have a device running 24/7 connected to Telegram. After a few days of operation, I usually find the device frozen in the morning. After troubleshooting, I identified that the issue occurs with the sendMessage call, which hangs (does not return) and eventually causes the device to lock up.
This is the function I am using: