mirror of https://github.com/arendst/Tasmota.git
Merge pull request #6832 from s-hadinger/fix_upnp_crash
Fix random crash caused by UPNP flood
This commit is contained in:
commit
9a431af91b
|
@ -1,6 +1,7 @@
|
||||||
/*********************************************************************************************\
|
/*********************************************************************************************\
|
||||||
* 7.0.0.3 20191103
|
* 7.0.0.3 20191103
|
||||||
* Initial support for I2C driver runtime control using command I2CDriver and document I2CDEVICES.md
|
* Initial support for I2C driver runtime control using command I2CDriver and document I2CDEVICES.md
|
||||||
|
* Fix random crash caused by UPNP flood
|
||||||
*
|
*
|
||||||
* 7.0.0.2 20191102
|
* 7.0.0.2 20191102
|
||||||
* Add command WebColor19 to control color of Module and Name (#6811)
|
* Add command WebColor19 to control color of Module and Name (#6811)
|
||||||
|
|
|
@ -75,7 +75,7 @@ bool UdpConnect(void)
|
||||||
void PollUdp(void)
|
void PollUdp(void)
|
||||||
{
|
{
|
||||||
if (udp_connected) {
|
if (udp_connected) {
|
||||||
if (PortUdp.parsePacket()) {
|
while (PortUdp.parsePacket()) {
|
||||||
char packet_buffer[UDP_BUFFER_SIZE]; // buffer to hold incoming UDP/SSDP packet
|
char packet_buffer[UDP_BUFFER_SIZE]; // buffer to hold incoming UDP/SSDP packet
|
||||||
|
|
||||||
int len = PortUdp.read(packet_buffer, UDP_BUFFER_SIZE -1);
|
int len = PortUdp.read(packet_buffer, UDP_BUFFER_SIZE -1);
|
||||||
|
@ -134,7 +134,7 @@ void PollUdp(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
delay(1);
|
optimistic_yield(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue