Skip to content

Commit

Permalink
Bugfix: Prevent crash when WiFi connection lost
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Nov 5, 2023
1 parent c955fdb commit c5cf712
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions BSB_LAN/BSB_LAN.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7569,9 +7569,11 @@ void loop() {
#if defined(WIFI) && defined(ESP32)
// if WiFi is down, try reconnecting every minute
bool not_preferred_bssid = false;
for (int x=0;x<6;x++) {
if (WiFi.BSSID()[x] != bssid[x] && bssid[x] > 0) {
not_preferred_bssid = true;
if (WiFi.BSSID() != NULL) {
for (int x=0;x<6;x++) {
if (WiFi.BSSID()[x] != bssid[x] && bssid[x] > 0) {
not_preferred_bssid = true;
}
}
}

Expand Down

0 comments on commit c5cf712

Please sign in to comment.