Skip to content

Commit 4189364

Browse files
maass-hamburgfabiobaltieri
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 ba7efd9 commit 4189364

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
@@ -115,6 +115,8 @@ int hawkbit_autohandler_set_delay(k_timeout_t timeout, bool if_bigger)
115115

116116
void hawkbit_autohandler(bool auto_reschedule)
117117
{
118+
k_event_clear(&hawkbit_autohandler_event, UINT32_MAX);
119+
118120
if (auto_reschedule) {
119121
k_work_reschedule(&hawkbit_work_handle, K_NO_WAIT);
120122
} else {

0 commit comments

Comments
 (0)