aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/ev_epoll1_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/iomgr/ev_epoll1_linux.cc')
-rw-r--r--src/core/lib/iomgr/ev_epoll1_linux.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc
index 86a0243d2e..e8ee5c4ce9 100644
--- a/src/core/lib/iomgr/ev_epoll1_linux.cc
+++ b/src/core/lib/iomgr/ev_epoll1_linux.cc
@@ -386,15 +386,27 @@ static bool fd_is_shutdown(grpc_fd* fd) {
}
static void fd_notify_on_read(grpc_fd* fd, grpc_closure* closure) {
- fd->read_closure->NotifyOn(closure);
+ if (closure != nullptr) {
+ fd->read_closure->NotifyOn(closure);
+ } else {
+ fd->read_closure->SetReady();
+ }
}
static void fd_notify_on_write(grpc_fd* fd, grpc_closure* closure) {
- fd->write_closure->NotifyOn(closure);
+ if (closure != nullptr) {
+ fd->write_closure->NotifyOn(closure);
+ } else {
+ fd->write_closure->SetReady();
+ }
}
static void fd_notify_on_error(grpc_fd* fd, grpc_closure* closure) {
- fd->error_closure->NotifyOn(closure);
+ if (closure != nullptr) {
+ fd->error_closure->NotifyOn(closure);
+ } else {
+ fd->error_closure->SetReady();
+ }
}
static void fd_become_readable(grpc_fd* fd, grpc_pollset* notifier) {