Skip to content

Commit 682af0e

Browse files
maass-hamburggithub-actions[bot]
authored andcommitted
mgmt: hawkbit: also clear in the call of hawkbit_autohandler()
the k_event_clear in the work might be to late sometimes, when hawkbit_autohandler_wait() is executed directly after hawkbit_autohandler(). This leads to getting the events of the former execution and also not waiting until the current autohandler run is finished. Signed-off-by: Fin Maaß <[email protected]> (cherry picked from commit e59451a)
1 parent 43c79ba commit 682af0e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

subsys/mgmt/hawkbit/hawkbit_autohandler.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ int hawkbit_autohandler_set_delay(k_timeout_t timeout, bool if_bigger)
119119

120120
void hawkbit_autohandler(bool auto_reschedule)
121121
{
122+
k_event_clear(&hawkbit_autohandler_event, UINT32_MAX);
123+
122124
if (auto_reschedule) {
123125
k_work_reschedule(&hawkbit_work_handle, K_NO_WAIT);
124126
} else {

0 commit comments

Comments
 (0)