Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions libraries/ESP8266WiFi/src/ESP8266WiFiMulti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ bool ESP8266WiFiMulti::existsAP(const char* ssid, const char *passphrase) {
return APlistExists(ssid, passphrase);
}

wl_status_t ESP8266WiFiMulti::run(void) {
wl_status_t ESP8266WiFiMulti::run(uint32_t connectTimeout) {

wl_status_t status = WiFi.status();
if(status == WL_DISCONNECTED || status == WL_NO_SSID_AVAIL || status == WL_IDLE_STATUS || status == WL_CONNECT_FAILED) {
Expand Down Expand Up @@ -132,8 +132,6 @@ wl_status_t ESP8266WiFiMulti::run(void) {

WiFi.begin(bestNetwork.ssid, bestNetwork.passphrase, bestChannel, bestBSSID);
status = WiFi.status();

static const uint32_t connectTimeout = 5000; //5s timeout

auto startTime = millis();
// wait for connection, fail, or timeout
Expand Down
2 changes: 1 addition & 1 deletion libraries/ESP8266WiFi/src/ESP8266WiFiMulti.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ESP8266WiFiMulti {
bool addAP(const char* ssid, const char *passphrase = NULL);
bool existsAP(const char* ssid, const char *passphrase = NULL);

wl_status_t run(void);
wl_status_t run(uint32_t connectTimeout=5000);

void cleanAPlist(void);

Expand Down