timers: stop all timers on teardown

This commit is contained in:
Björn Linse 2016-05-28 11:16:03 +02:00
parent c16cb06656
commit d6d8073939
2 changed files with 10 additions and 1 deletions

View File

@ -16609,6 +16609,14 @@ static void timer_free_cb(TimeWatcher *tw, void *data)
xfree(timer);
}
void timer_teardown(void)
{
timer_T *timer;
map_foreach_value(timers, timer, {
timer_stop(timer);
})
}
/*
* "tolower(string)" function
*/

View File

@ -161,6 +161,7 @@ void event_teardown(void)
input_stop();
channel_teardown();
process_teardown(&main_loop);
timer_teardown();
server_teardown();
signal_teardown();
terminal_teardown();