remove useless condition in if statement (#2371)
* fix log error code format * remove useless condition in if statement
This commit is contained in:
parent
755cd938f7
commit
aa2393b573
@ -47,7 +47,9 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
|
|||||||
|
|
||||||
int8_t scanResult;
|
int8_t scanResult;
|
||||||
uint8_t status = WiFi.status();
|
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();
|
scanResult = WiFi.scanNetworks();
|
||||||
if(scanResult == WIFI_SCAN_RUNNING) {
|
if(scanResult == WIFI_SCAN_RUNNING) {
|
||||||
@ -148,7 +150,7 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
|
|||||||
// scan wifi async mode
|
// scan wifi async mode
|
||||||
WiFi.scanNetworks(true);
|
WiFi.scanNetworks(true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user