mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Update ArduinoOTA.cpp
Restarts the UDP port if it becomes disconnected. Works when for example the wifi is disconnected and reconnected
This commit is contained in:
parent
49bc812ccd
commit
46658593b0
@ -52,6 +52,11 @@ void ArduinoOTA::setup() {
|
||||
|
||||
void ArduinoOTA::handle() {
|
||||
|
||||
if (!*_udp_ota) {
|
||||
_udp_ota->begin(_port);
|
||||
Serial.println(F("OTA restarted"));
|
||||
}
|
||||
|
||||
if (!_udp_ota->parsePacket()) return;
|
||||
|
||||
IPAddress remote = _udp_ota->remoteIP();
|
||||
|
Loading…
x
Reference in New Issue
Block a user