mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-31 22:47:44 +00:00
Change order of evaluation
Change order of evaluation
This commit is contained in:
parent
e19ba70c7f
commit
b8dfc6b1b5
@ -197,6 +197,7 @@ void HueRespondToMSearch(void)
|
||||
bool UdpDisconnect(void)
|
||||
{
|
||||
if (udp_connected) {
|
||||
PortUdp.flush();
|
||||
WiFiUDP::stopAll();
|
||||
AddLog_P(LOG_LEVEL_DEBUG, PSTR(D_LOG_UPNP D_MULTICAST_DISABLED));
|
||||
udp_connected = false;
|
||||
@ -232,7 +233,7 @@ void PollUdp(void)
|
||||
AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("UDP: Packet (%d)"), len);
|
||||
// AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("\n%s"), packet_buffer);
|
||||
|
||||
if ((strstr_P(packet_buffer, PSTR("M-SEARCH")) != nullptr) && !udp_response_mutex && devices_present) {
|
||||
if (devices_present && !udp_response_mutex && (strstr_P(packet_buffer, PSTR("M-SEARCH")) != nullptr)) {
|
||||
udp_response_mutex = true;
|
||||
|
||||
udp_remote_ip = PortUdp.remoteIP();
|
||||
|
Loading…
x
Reference in New Issue
Block a user