Browse Source

Clean up the epoll wakeup fd too.

David Klempner 10 years ago
parent
commit
a10abbdbec
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/core/iomgr/pollset_multipoller_with_epoll.c

+ 2 - 0
src/core/iomgr/pollset_multipoller_with_epoll.c

@@ -149,12 +149,14 @@ static int multipoll_with_epoll_pollset_maybe_work(
 
 
 static void multipoll_with_epoll_pollset_destroy(grpc_pollset *pollset) {
 static void multipoll_with_epoll_pollset_destroy(grpc_pollset *pollset) {
   pollset_hdr *h = pollset->data.ptr;
   pollset_hdr *h = pollset->data.ptr;
+
   close(h->epoll_fd);
   close(h->epoll_fd);
   gpr_free(h);
   gpr_free(h);
 }
 }
 
 
 static void epoll_kick(grpc_pollset *pollset) {
 static void epoll_kick(grpc_pollset *pollset) {
   pollset_hdr *h = pollset->data.ptr;
   pollset_hdr *h = pollset->data.ptr;
+  grpc_wakeup_fd_destroy(&h->wakeup_fd);
   grpc_wakeup_fd_wakeup(&h->wakeup_fd);
   grpc_wakeup_fd_wakeup(&h->wakeup_fd);
 }
 }