Fix deep sleep locking for Timeout class

Detach in the Timeout::handler so deep sleep is properly unlocked.
pull/6533/head
Russ Butler 2018-03-28 00:25:57 +02:00
parent 4a5ac149ec
commit 1b58e58e1a
1 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,9 @@
namespace mbed {
void Timeout::handler() {
_function.call();
Callback<void()> local = _function;
detach();
local.call();
}
} // namespace mbed