diff --git a/src/mgos_timers.c b/src/mgos_timers.c index c09efbb5a..232241e7c 100644 --- a/src/mgos_timers.c +++ b/src/mgos_timers.c @@ -98,6 +98,8 @@ static void mgos_timer_ev(struct mg_connection *nc, int ev, void *ev_data, } else { LIST_REMOVE(ti, entries); } + } else { + ti = NULL; } schedule_next_timer(td, now); mgos_runlock(s_timer_data_lock);