Unverified Commit 268d0aa1 authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

On Timer::once execution, delete the alarm_id (#2245)

A Timer is not active after the alarm fires once, so clear the
alarm ID so we know we're not running.
parent 553f7604
......@@ -85,5 +85,7 @@ int64_t Ticker::_alarm_callback(alarm_id_t id, void *user_data) {
if (_this && _this->_callback_function) {
_this->_callback_with_arg(_this->_callback_arg);
}
_this->_alarm_id = -1;
_this->_callback_with_arg = nullptr;
return 0; // These are only a 1-shot
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment