Skip to content

Commit

Permalink
IPv6: redo waitForWifiToConnect loop (still needs work)
Browse files Browse the repository at this point in the history
  • Loading branch information
Phaze-III committed May 6, 2024
1 parent d754629 commit 1ce964e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions airrohr-firmware/airrohr-firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2921,23 +2921,23 @@ static void waitForWifiToConnect(int maxRetries)
// happen before the IPv6 autoconfig is finished.

int retryCount = 0;
for (bool configured = false; !configured;) {
if (retryCount < maxRetries)
{
for (auto addr : addrList)
if ((configured = !addr.isLocal()
&& addr.isV6() // uncomment when IPv6 is mandatory
// && addr.ifnumber() == STATION_IF
))
{
break;
}
delay(500);
debug_out(".", DEBUG_MIN_INFO);
++retryCount;
for (bool configured = false; !configured;)
{
for (auto addr : addrList)
if ((configured = !addr.isLocal()
&& addr.isV6() // uncomment when IPv6 is mandatory
// && addr.ifnumber() == STATION_IF
))
{
break;
}
delay(500);
debug_out(".", DEBUG_MIN_INFO);
++retryCount;
if (retryCount >= maxRetries) {
break ;
}
}

}

/*****************************************************************
Expand Down

0 comments on commit 1ce964e

Please sign in to comment.