diff options
author | 2015-12-01 10:32:28 -0800 | |
---|---|---|
committer | 2015-12-01 10:36:19 -0800 | |
commit | 5d850377482cf0925a46f286ce8a3c71c640d7c5 (patch) | |
tree | 9d136706ad79550bb6d057c72348f9b06cf07836 /src/core/iomgr/fd_posix.c | |
parent | 58f8049645d828026603af6422a59414f54799e8 (diff) |
update api
Diffstat (limited to 'src/core/iomgr/fd_posix.c')
-rw-r--r-- | src/core/iomgr/fd_posix.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index d7c682a91a..2be0ea235f 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -207,11 +207,13 @@ static int has_watchers(grpc_fd *fd) { } void grpc_fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, - int release_fd, const char *reason) { + int *release_fd, const char *reason) { fd->on_done_closure = on_done; - fd->released = release_fd; + fd->released = release_fd != NULL; if (!fd->released) { shutdown(fd->fd, SHUT_RDWR); + } else { + *release_fd = fd->fd; } gpr_mu_lock(&fd->mu); REF_BY(fd, 1, reason); /* remove active status, but keep referenced */ |