aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-10-04 12:21:53 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-10-04 12:21:53 -0700
commit825af91175cfee73089159921228bc07aeef39c4 (patch)
tree3dcc3e3464a767178f05bce7827dcca338042a76 /src/core/lib
parent274c8ed001aca0dc563ee7e04ecd2f9a486b77ec (diff)
parent23006cb338e8e95612ec6ff52d88f37e933a8e58 (diff)
Merge remote-tracking branch 'upstream/master' into max_message_size_fix
Diffstat (limited to 'src/core/lib')
-rw-r--r--src/core/lib/iomgr/udp_server.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c
index 48032412a2..12e929fa6a 100644
--- a/src/core/lib/iomgr/udp_server.c
+++ b/src/core/lib/iomgr/udp_server.c
@@ -171,6 +171,8 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) {
sp->destroyed_closure.cb = destroyed_port;
sp->destroyed_closure.cb_arg = s;
+ /* Call the orphan_cb to signal that the FD is about to be closed and
+ * should no longer be used. */
GPR_ASSERT(sp->orphan_cb);
sp->orphan_cb(sp->emfd);
@@ -197,6 +199,11 @@ void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *s,
/* shutdown all fd's */
if (s->active_ports) {
for (i = 0; i < s->nports; i++) {
+ /* Call the orphan_cb to signal that the FD is about to be closed and
+ * should no longer be used. */
+ GPR_ASSERT(sp->orphan_cb);
+ sp->orphan_cb(sp->emfd);
+
grpc_fd_shutdown(exec_ctx, s->ports[i].emfd);
}
gpr_mu_unlock(&s->mu);