From 2d6ced95214298abea3492ecaf91874477a5f47a Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 10 Mar 2020 16:11:34 +0100 Subject: [PATCH] Try to fix intermittent watchdog reset Try to fix intermittent watchdog reset on GUI emulation change (#7886) --- tasmota/support_udp.ino | 2 +- tasmota/xdrv_01_webserver.ino | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tasmota/support_udp.ino b/tasmota/support_udp.ino index 9ff745364..d638c162a 100644 --- a/tasmota/support_udp.ino +++ b/tasmota/support_udp.ino @@ -58,7 +58,7 @@ bool UdpDisconnect(void) bool UdpConnect(void) { - if (!udp_connected) { + if (!udp_connected && !restart_flag) { // Simple Service Discovery Protocol (SSDP) if (PortUdp.beginMulticast(WiFi.localIP(), IPAddress(239,255,255,250), 1900)) { AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_UPNP D_MULTICAST_REJOINED)); diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index 2dff240ad..1c5201cb9 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -1935,6 +1935,7 @@ void OtherSaveSettings(void) SettingsUpdateText(SET_WEBPWD, (!strlen(tmp)) ? "" : (strchr(tmp,'*')) ? SettingsText(SET_WEBPWD) : tmp); Settings.flag.mqtt_enabled = WebServer->hasArg("b1"); // SetOption3 - Enable MQTT #ifdef USE_EMULATION + UdpDisconnect(); #if defined(USE_EMULATION_WEMO) || defined(USE_EMULATION_HUE) WebGetArg("b2", tmp, sizeof(tmp)); Settings.flag2.emulation = (!strlen(tmp)) ? 0 : atoi(tmp);