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:
parent
c92b617397
commit
1424b6d1a4
@ -370,6 +370,9 @@ void ArduinoOTAClass::end() {
|
||||
}
|
||||
|
||||
void ArduinoOTAClass::handle() {
|
||||
if (!_initialized) {
|
||||
return;
|
||||
}
|
||||
if (_state == OTA_RUNUPDATE) {
|
||||
_runUpdate();
|
||||
_state = OTA_IDLE;
|
||||
|
Loading…
Reference in New Issue
Block a user