Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 210c3d4

Browse filesBrowse files
committed
Fix expiredOneShot to properly stay expired forever unless reset.
1 parent 232961e commit 210c3d4
Copy full SHA for 210c3d4

File tree

Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed

‎cores/esp8266/PolledTimeout.h

Copy file name to clipboardExpand all lines: cores/esp8266/PolledTimeout.h
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,16 @@ class timeoutTemplate
269269
}
270270

271271
IRAM_ATTR // fast
272-
bool expiredOneShot() const
272+
bool expiredOneShot()
273273
{
274274
// returns "always expired" or "has expired"
275-
return !canWait() || checkExpired(TimePolicyT::time());
275+
return !canWait();
276+
if (checkExpired(TimePolicyT::time()))
277+
{
278+
_timeout = alwaysExpired;
279+
return true;
280+
}
281+
return false;
276282
}
277283

278284
timeType _timeout;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.