提交 1424b6d1 编写于 作者: S sticilface 提交者: 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.
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册