1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Fix compilation of ArduinoOTA when no global MDNS is available (#8478)

This commit is contained in:
Drzony 2022-02-05 00:05:38 +01:00 committed by GitHub
parent 9f536e68f8
commit 3027acaf11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -353,9 +353,11 @@ void ArduinoOTAClass::end() {
_initialized = false; _initialized = false;
_udp_ota->unref(); _udp_ota->unref();
_udp_ota = 0; _udp_ota = 0;
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_MDNS)
if(_useMDNS){ if(_useMDNS){
MDNS.end(); MDNS.end();
} }
#endif
_state = OTA_IDLE; _state = OTA_IDLE;
#ifdef OTA_DEBUG #ifdef OTA_DEBUG
OTA_DEBUG.printf("OTA server stopped.\n"); OTA_DEBUG.printf("OTA server stopped.\n");