From 6c8d47b9bb15fc117252c8cf0b6f97a08ef7f336 Mon Sep 17 00:00:00 2001 From: AaronKonishi Date: Wed, 16 Oct 2019 15:00:19 +0800 Subject: [PATCH] close epoll_fd in timer_deinit() function Signed-off-by: AaronKonishi Changes to be committed: modified: source/mt_timer.c --- source/mt_timer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/mt_timer.c b/source/mt_timer.c index cacf1a1..c01f18b 100644 --- a/source/mt_timer.c +++ b/source/mt_timer.c @@ -64,6 +64,8 @@ void timer_deinit(MT_TIMER_OBJECT *object) timer_add(object, &itimespec, 0, NULL, NULL, NULL); pthread_join(object->timer_thread_id, NULL); timer_clear(object); + close(object->timer_epoll_fd); + object->timer_epoll_fd = -1; } int timer_add(MT_TIMER_OBJECT *object, struct itimerspec *itimespec,