summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pppd/triton/timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/triton/timer.c b/accel-pppd/triton/timer.c
index 744b10b3..5b5d9535 100644
--- a/accel-pppd/triton/timer.c
+++ b/accel-pppd/triton/timer.c
@@ -108,6 +108,8 @@ void *timer_thread(void *arg)
while (!list_empty(&freed_list2)) {
t = list_entry(freed_list2.next, typeof(*t), entry);
+ epoll_ctl(epoll_fd,EPOLL_CTL_DEL, t->fd, &t->epoll_event);
+ close(t->fd);
list_del(&t->entry);
triton_context_release(t->ctx);
mempool_free(t);
@@ -199,8 +201,6 @@ void __export triton_timer_del(struct triton_timer_t *ud)
{
struct _triton_timer_t *t = (struct _triton_timer_t *)ud->tpd;
- close(t->fd);
-
spin_lock(&t->ctx->lock);
t->ud = NULL;
list_del(&t->entry);