Remove fd from pollset when releasing the fd

pull/18930/head
yang-g 6 years ago
parent a8644bbc77
commit 7cab9c7811
  1. 4
      src/core/lib/iomgr/ev_epoll1_linux.cc

@ -383,6 +383,10 @@ static void fd_shutdown_internal(grpc_fd* fd, grpc_error* why,
if (fd->read_closure->SetShutdown(GRPC_ERROR_REF(why))) {
if (!releasing_fd) {
shutdown(fd->fd, SHUT_RDWR);
} else {
if (epoll_ctl(g_epoll_set.epfd, EPOLL_CTL_DEL, fd->fd, nullptr) != 0) {
gpr_log(GPR_ERROR, "epoll_ctl failed: %s", strerror(errno));
}
}
fd->write_closure->SetShutdown(GRPC_ERROR_REF(why));
fd->error_closure->SetShutdown(GRPC_ERROR_REF(why));

Loading…
Cancel
Save