mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-15 07:31:21 +10:00
fix #527 for esp8266
This commit is contained in:
+7
-6
@@ -172,13 +172,14 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
|
||||
WiFi.hostname(_hostname);
|
||||
#elif defined(ESP32)
|
||||
WiFi.setHostname(_hostname);
|
||||
if(WiFi.status() == WL_CONNECTED){
|
||||
DEBUG_WM("reconnecting to set new hostname");
|
||||
// WiFi.reconnect(); // does not reset dhcp
|
||||
WiFi_Disconnect();
|
||||
delay(500); // need a delay for disconnect to change status()
|
||||
}
|
||||
#endif
|
||||
|
||||
if(WiFi.status() == WL_CONNECTED){
|
||||
DEBUG_WM("reconnecting to set new hostname");
|
||||
// WiFi.reconnect(); // does not reset dhcp
|
||||
WiFi_Disconnect();
|
||||
delay(500); // need a delay for disconnect to change status()
|
||||
}
|
||||
}
|
||||
|
||||
// if already connected, or try stored connect
|
||||
|
||||
+1
-1
@@ -226,7 +226,7 @@ class WiFiManager
|
||||
boolean _cpClientCheck = false; // keep cp alive if cp have station
|
||||
boolean _webClientCheck = true; // keep cp alive if web have client
|
||||
boolean _scanDispOptions = false; // show percentage in scans not icons
|
||||
const char * _hostname = "";
|
||||
const char * _hostname = "wmtest";
|
||||
|
||||
const char* _customHeadElement = ""; // store custom head element html from user
|
||||
|
||||
|
||||
Reference in New Issue
Block a user