From 2db5bda6b689df36089a4e69baf2a0b018275d57 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 9 Feb 2017 10:30:55 -0800 Subject: [PATCH] Fix grpclb --- src/core/lib/surface/call.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 0d216f82f98..6a85f279712 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1113,6 +1113,7 @@ static void post_batch_completion(grpc_exec_ctx *exec_ctx, if (bctl->is_notify_tag_closure) { /* unrefs bctl->error */ + bctl->call = NULL; grpc_closure_run(exec_ctx, bctl->notify_tag, error); GRPC_CALL_INTERNAL_UNREF(exec_ctx, call, "completion"); } else { @@ -1352,6 +1353,8 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, grpc_cq_end_op(exec_ctx, call->cq, notify_tag, GRPC_ERROR_NONE, free_no_op_completion, NULL, gpr_malloc(sizeof(grpc_cq_completion))); + } else { + grpc_closure_sched(exec_ctx, notify_tag, GRPC_ERROR_NONE); } error = GRPC_CALL_OK; goto done;