Skip to content

Commit fff7299

Browse files
authored
Merge pull request #6533 from c1728p9/timeout_fix
Fix deep sleep locking for Timeout class
2 parents 75cb4d7 + 1b58e58 commit fff7299

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/Timeout.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
namespace mbed {
1919

2020
void Timeout::handler() {
21-
_function.call();
21+
Callback<void()> local = _function;
22+
detach();
23+
local.call();
2224
}
2325

2426
} // namespace mbed

0 commit comments

Comments
 (0)