close epoll_fd in timer_deinit() function

Signed-off-by: AaronKonishi <konishi5202@163.com>

 Changes to be committed:

	modified:   source/mt_timer.c
master
AaronKonishi 2019-10-16 15:00:19 +08:00
parent f6286f4885
commit 6c8d47b9bb
1 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,8 @@ void timer_deinit(MT_TIMER_OBJECT *object)
timer_add(object, &itimespec, 0, NULL, NULL, NULL); timer_add(object, &itimespec, 0, NULL, NULL, NULL);
pthread_join(object->timer_thread_id, NULL); pthread_join(object->timer_thread_id, NULL);
timer_clear(object); timer_clear(object);
close(object->timer_epoll_fd);
object->timer_epoll_fd = -1;
} }
int timer_add(MT_TIMER_OBJECT *object, struct itimerspec *itimespec, int timer_add(MT_TIMER_OBJECT *object, struct itimerspec *itimespec,