Skip to content

Commit dffda0b

Browse files
a-c-sreedhar-reddyme-no-dev
authored andcommitted
log no networks found when scanResult is 0 (#2484)
1 parent 2ceab7c commit dffda0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: libraries/WiFi/src/WiFiMulti.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
5555
if(scanResult == WIFI_SCAN_RUNNING) {
5656
// scan is running
5757
return WL_NO_SSID_AVAIL;
58-
} else if(scanResult > 0) {
58+
} else if(scanResult >= 0) {
5959
// scan done analyze
6060
WifiAPlist_t bestNetwork { NULL, NULL };
6161
int bestNetworkDb = INT_MIN;
@@ -64,7 +64,7 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
6464

6565
log_i("[WIFI] scan done");
6666

67-
if(scanResult <= 0) {
67+
if(scanResult == 0) {
6868
log_e("[WIFI] no networks found");
6969
} else {
7070
log_i("[WIFI] %d networks found", scanResult);

0 commit comments

Comments
 (0)