mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-11 15:22:13 +03:00
Fix for wifi disconnect handling (#431)
This commit is contained in:
@ -124,9 +124,10 @@ int WiFiUDP::available() {
|
||||
/* Release any resources being used by this WiFiUDP instance */
|
||||
void WiFiUDP::stop()
|
||||
{
|
||||
if (_ctx)
|
||||
if (_ctx) {
|
||||
_ctx->disconnect();
|
||||
_ctx->unref();
|
||||
_ctx->unref();
|
||||
}
|
||||
_ctx = 0;
|
||||
}
|
||||
|
||||
@ -271,6 +272,7 @@ uint16_t WiFiUDP::localPort()
|
||||
void WiFiUDP::stopAll()
|
||||
{
|
||||
for (WiFiUDP* it = _s_first; it; it = it->_next) {
|
||||
DEBUGV("%s %08x %08x\n", __func__, (uint32_t) it, (uint32_t) _s_first);
|
||||
it->stop();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user