cotestatnt / AsyncTelegram2

Powerful, flexible and secure Arduino Telegram BOT library. Hardware independent, it can be used with any MCU capable of handling an SSL connection.
MIT License
83 stars 25 forks source link

suggest a possible solution to the problem #79

Closed Demon-MC closed 1 year ago

Demon-MC commented 2 years ago

last night one of the members of the group where the bot is installed threw a very large text into the chat 9627DC1A-5CA5-45E8-B0A4-6CFC09F3CA76 after that esp8266 hung. there is no way to check the console. esp8266 also stopped sending information from sensors to the Internet. 90F20BDF-7667-4E24-976D-E87F25D69405 passed the last information from the esp sensors before sending a large text to the chat

question: how to protect esp from large text messages in chat so that the bot skips them and does not process them? especially messages in Cyrillic.

Demon-MC commented 2 years ago

forgot to write. esp continues to work and pings over the network. but the loop function hung at some point

joroMaser commented 2 years ago

https://github.com/cotestatnt/AsyncTelegram2/blob/master/src/AsyncTelegram2.cpp#L218-L231 Is that section didn't run? @Demon-MC

Demon-MC commented 2 years ago

I'm not sure about this yet.. is there any way in c++ code to set the maximum length of the received command message