1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-07 06:01:35 +03:00

stop lwIP dhcp client when WiFi goes off. (#5703)

* stop lwIP dhcp client with WiFi goes off.

* stop dhcp-client when really unused
This commit is contained in:
david gauchard
2019-02-01 18:33:26 +01:00
committed by Develo
parent 3f8cd46dc2
commit 1cacf92ce1

View File

@ -389,6 +389,11 @@ bool ESP8266WiFiGenericClass::mode(WiFiMode_t m) {
bool ret = false;
if (m != WIFI_STA && m != WIFI_AP_STA)
// calls lwIP's dhcp_stop(),
// safe to call even if not started
wifi_station_dhcpc_stop();
ETS_UART_INTR_DISABLE();
if(_persistent) {
ret = wifi_set_opmode(m);