mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-06-30 04:21:00 +02:00
Add guard to handle to check for _initialized (#1321)
The wifi stack initialisation must be complete before calling `_udp_ota.parsePacket()` otherwise you just get a screen filled with ``` ``` and due to the more async methods in ESP32 `handle()` may be called before this can occur.
This commit is contained in:
@ -370,6 +370,9 @@ void ArduinoOTAClass::end() {
|
||||
}
|
||||
|
||||
void ArduinoOTAClass::handle() {
|
||||
if (!_initialized) {
|
||||
return;
|
||||
}
|
||||
if (_state == OTA_RUNUPDATE) {
|
||||
_runUpdate();
|
||||
_state = OTA_IDLE;
|
||||
|
Reference in New Issue
Block a user