Fixed (improved) main loop blocking while calling myBot.getNewMessage without internet connection (e.g cable unplugged from the WAN port of a router, but Wi-Fi still presented).
There is till some blocking around 16 secs of duration each 10*m_minUpdateTime because of invoking reset(); but at least not each loop() iteration :)
The 16 sec block is caused by WiFiClientSecure::connect function, which also seems to be known issue
https://github.com/espressif/arduino-esp32/pull/5418
Tested on esp8266 but perhaps should be similar behavior on esp32.
Fixed (improved) main loop blocking while calling myBot.getNewMessage without internet connection (e.g cable unplugged from the WAN port of a router, but Wi-Fi still presented).
There is till some blocking around 16 secs of duration each 10*m_minUpdateTime because of invoking reset(); but at least not each loop() iteration :) The 16 sec block is caused by WiFiClientSecure::connect function, which also seems to be known issue https://github.com/espressif/arduino-esp32/pull/5418
Tested on esp8266 but perhaps should be similar behavior on esp32.