From 0221e9a2886b6b282f6e36fed88707752f0456d5 Mon Sep 17 00:00:00 2001 From: Juraj Andrassy Date: Tue, 7 Nov 2023 21:38:41 +0100 Subject: [PATCH] WiFiSTA - allow using DHCP again after disconnecting static IP --- libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp b/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp index c27000182c..f98e8ac50c 100644 --- a/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp +++ b/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp @@ -400,6 +400,8 @@ bool ESP8266WiFiSTAClass::disconnect(bool wifioff, bool eraseCredentials) { WiFi.enableSTA(false); } + _useStaticIp = false; + return ret; }