Try to fix intermittent watchdog reset

Try to fix intermittent watchdog reset on GUI emulation change (#7886)
This commit is contained in:
Theo Arends 2020-03-10 16:11:34 +01:00
parent e04bb5ecff
commit 2d6ced9521
2 changed files with 2 additions and 1 deletions

View File

@ -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));

View File

@ -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);