ESP8266's WiFi.waitForConnectResult() doesn't have couter to try to connection ?
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
ESP32's WiFI.waitForConnectResult() has a counter to try 100 times.
Wish ESP8266 has the same behavior too.
Thank you.
```
// ESP32's WiFi.waitForConnectionResult()
uint8_t WiFiSTAClass::waitForConnectResult()
{
//1 and 3 have STA enabled
if((WiFiGenericClass::getMode() & WIFI_MODE_STA) == 0) {
return WL_DISCONNECTED;
}
int i = 0;
while((!status() || status() >= WL_DISCONNECTED) && i++ < 100) {
delay(100);
}
return status();
}
```
ESP8266 v2.4.1 core
```
uint8_t ESP8266WiFiSTAClass::waitForConnectResult() {
//1 and 3 have STA enabled
if((wifi_get_opmode() & 1) == 0) {
return WL_DISCONNECTED;
}
while(status() == WL_DISCONNECTED) {
delay(100);
}
return status();
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.