From 566b6c279fc4d47150aae4a58b65458b98384727 Mon Sep 17 00:00:00 2001 From: zfx Date: Mon, 28 Jun 2021 19:21:09 +0800 Subject: [PATCH] modify bug that delete the timer when it is pending Signed-off-by: zfx --- osal/src/osal_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osal/src/osal_timer.c b/osal/src/osal_timer.c index 367a25a..960828a 100644 --- a/osal/src/osal_timer.c +++ b/osal/src/osal_timer.c @@ -168,7 +168,7 @@ int32_t OsalTimerDelete(OsalTimer *timer) OsalMutexUnlock(&ktimer->mutex); if (ktimer->mode == OSAL_TIMER_ONCE) - add_timer(&ktimer->timer); + mod_timer(&ktimer->timer, ktimer->timer.expires); timer->realTimer = NULL; -- Gitee