Skip to content

Commit f08eafc

Browse files
committed
Fix reconnects happens to quickly #919
1 parent 9840c77 commit f08eafc

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

platformio.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ build_flags =
7474
; -- Hasp build options ----------------------------
7575
-D HASP_VER_MAJ=0
7676
-D HASP_VER_MIN=7
77-
;-D HASP_VER_REV=4
78-
-D HASP_VER_REV=0-rc15
77+
-D HASP_VER_REV=0.1
78+
;-D HASP_VER_REV=0-rc15
7979
;-D HASP_VER_REV=4-rc1
8080
${override.build_flags}
8181

src/sys/net/hasp_wifi.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ void wifiSetup()
509509

510510
WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN);
511511
wifiReconnect();
512-
WiFi.setAutoReconnect(false); // done in wifiEvery5Seconds
512+
WiFi.setAutoReconnect(true); // done in wifiEvery5Seconds
513513
LOG_TRACE(TAG_WIFI, F(D_WIFI_CONNECTING_TO), wifiSsid);
514514
}
515515
#endif
@@ -532,10 +532,11 @@ bool wifiEvery5Seconds()
532532
return true;
533533
}
534534

535-
if(wifiEnabled) {
536-
LOG_WARNING(TAG_WIFI, F("No Connection... retry %d"), network_reconnect_counter);
537-
wifiReconnect();
538-
}
535+
// Issue #919 : Reconnects happens to quickly
536+
// if(wifiEnabled) {
537+
// LOG_WARNING(TAG_WIFI, F("No Connection... retry %d"), network_reconnect_counter);
538+
// wifiReconnect();
539+
// }
539540

540541
return false;
541542
}

0 commit comments

Comments
 (0)