Commit 1424b6d1 authored by sticilface's avatar sticilface Committed by Me No Dev

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.
parent c92b6173
...@@ -370,6 +370,9 @@ void ArduinoOTAClass::end() { ...@@ -370,6 +370,9 @@ void ArduinoOTAClass::end() {
} }
void ArduinoOTAClass::handle() { void ArduinoOTAClass::handle() {
if (!_initialized) {
return;
}
if (_state == OTA_RUNUPDATE) { if (_state == OTA_RUNUPDATE) {
_runUpdate(); _runUpdate();
_state = OTA_IDLE; _state = OTA_IDLE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment