Skip to content

Commit

Permalink
log no networks found when scanResult is 0 (#2484)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-c-sreedhar-reddy authored and me-no-dev committed Mar 3, 2019
1 parent 2ceab7c commit dffda0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/WiFi/src/WiFiMulti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
if(scanResult == WIFI_SCAN_RUNNING) {
// scan is running
return WL_NO_SSID_AVAIL;
} else if(scanResult > 0) {
} else if(scanResult >= 0) {
// scan done analyze
WifiAPlist_t bestNetwork { NULL, NULL };
int bestNetworkDb = INT_MIN;
Expand All @@ -64,7 +64,7 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)

log_i("[WIFI] scan done");

if(scanResult <= 0) {
if(scanResult == 0) {
log_e("[WIFI] no networks found");
} else {
log_i("[WIFI] %d networks found", scanResult);
Expand Down

0 comments on commit dffda0b

Please sign in to comment.