remove useless condition in if statement (#2371)

* fix log error code format

* remove useless condition in if statement
This commit is contained in:
acevest 2019-02-14 19:52:52 +08:00 committed by Me No Dev
parent 755cd938f7
commit aa2393b573

View File

@ -47,7 +47,9 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
int8_t scanResult;
uint8_t status = WiFi.status();
if(status != WL_CONNECTED || status == WL_NO_SSID_AVAIL || status == WL_IDLE_STATUS || status == WL_CONNECT_FAILED) {
if(status == WL_CONNECTED) {
return status;
}
scanResult = WiFi.scanNetworks();
if(scanResult == WIFI_SCAN_RUNNING) {
@ -148,7 +150,7 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
// scan wifi async mode
WiFi.scanNetworks(true);
}
}
return status;
}