Skip to content

Commit

Permalink
Explain function of special PolledTimeout to the code reader
Browse files Browse the repository at this point in the history
  • Loading branch information
dok-net committed May 18, 2021
1 parent f382fc9 commit 95b06ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ int8_t ESP8266WiFiSTAClass::waitForConnectResult(unsigned long timeoutLength) {
if((wifi_get_opmode() & 1) == 0) {
return WL_DISCONNECTED;
}
// if probing doesn't trip, this yields
using oneShotYieldMs = esp8266::polledTimeout::timeoutTemplate<false, esp8266::polledTimeout::YieldPolicy::YieldOrSkip>;
oneShotYieldMs timeout(timeoutLength); // number of milliseconds to wait before returning timeout error
while(!timeout) {
Expand Down

0 comments on commit 95b06ce

Please sign in to comment.