1
0
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:
Ivan Grokhotkov
2015-06-22 13:59:12 +03:00
parent dc08418f08
commit b029e78a67
2 changed files with 7 additions and 3 deletions

View File

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