aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/ev_epollex_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/iomgr/ev_epollex_linux.cc')
-rw-r--r--src/core/lib/iomgr/ev_epollex_linux.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
index 7b368410cf..b17aa90573 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.cc
+++ b/src/core/lib/iomgr/ev_epollex_linux.cc
@@ -539,15 +539,27 @@ static void fd_shutdown(grpc_fd* fd, grpc_error* why) {
}
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();
+ }
}
/*******************************************************************************