diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc index 4dff4579dac..35e4e119649 100644 --- a/src/core/lib/iomgr/ev_epoll1_linux.cc +++ b/src/core/lib/iomgr/ev_epoll1_linux.cc @@ -384,7 +384,11 @@ static void fd_shutdown_internal(grpc_fd* fd, grpc_error* why, if (!releasing_fd) { shutdown(fd->fd, SHUT_RDWR); } else { - if (epoll_ctl(g_epoll_set.epfd, EPOLL_CTL_DEL, fd->fd, nullptr) != 0) { + /* we need a dummy event for earlier linux versions. */ + epoll_event dummy_event; + memset(&dummy_event, 0, sizeof(dummy_event)); + if (epoll_ctl(g_epoll_set.epfd, EPOLL_CTL_DEL, fd->fd, &dummy_event) != + 0) { gpr_log(GPR_ERROR, "epoll_ctl failed: %s", strerror(errno)); } }