aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/security/transport/client_auth_filter.c
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2017-09-05 13:46:41 -0700
committerGravatar Mark D. Roth <roth@google.com>2017-09-05 13:46:41 -0700
commit180c6b184bcbf2315da8d45a8dd015f9f908d429 (patch)
treef198efbb37b0c44ee438c7e3864e0e046b377e70 /src/core/lib/security/transport/client_auth_filter.c
parentb2b9a0ff7eacc84335b800e31b13a7607acf614b (diff)
Reset cancellation closure when unreffing the call to avoid race conditions.
Diffstat (limited to 'src/core/lib/security/transport/client_auth_filter.c')
-rw-r--r--src/core/lib/security/transport/client_auth_filter.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c
index 69eb612eff..dd7dd44e79 100644
--- a/src/core/lib/security/transport/client_auth_filter.c
+++ b/src/core/lib/security/transport/client_auth_filter.c
@@ -95,7 +95,6 @@ static void on_credentials_metadata(grpc_exec_ctx *exec_ctx, void *arg,
grpc_transport_stream_op_batch *batch = (grpc_transport_stream_op_batch *)arg;
grpc_call_element *elem = batch->handler_private.extra_arg;
call_data *calld = elem->call_data;
- grpc_call_combiner_set_notify_on_cancel(exec_ctx, calld->call_combiner, NULL);
reset_auth_metadata_context(&calld->auth_md_context);
grpc_error *error = GRPC_ERROR_REF(input_error);
if (error == GRPC_ERROR_NONE) {
@@ -228,7 +227,6 @@ static void on_host_checked(grpc_exec_ctx *exec_ctx, void *arg,
grpc_transport_stream_op_batch *batch = (grpc_transport_stream_op_batch *)arg;
grpc_call_element *elem = batch->handler_private.extra_arg;
call_data *calld = elem->call_data;
- grpc_call_combiner_set_notify_on_cancel(exec_ctx, calld->call_combiner, NULL);
if (error == GRPC_ERROR_NONE) {
send_security_metadata(exec_ctx, elem, batch);
} else {
@@ -318,14 +316,6 @@ static void auth_start_transport_stream_op_batch(
on_host_checked(exec_ctx, batch, error);
GRPC_ERROR_UNREF(error);
} else {
-// FIXME: if grpc_channel_security_connector_check_call_host() invokes
-// the callback in this thread before returning, then we'll call
-// grpc_call_combiner_set_notify_on_cancel() to set it "back" to NULL
-// *before* we call this to set it to the cancel function.
-// Can't just do this before calling
-// grpc_channel_security_connector_check_call_host(), because then the
-// cancellation might be invoked before we actually send the request.
-// May need to fix the credentials plugin API to deal with this.
// Async return; register cancellation closure with call combiner.
GRPC_CALL_STACK_REF(calld->owning_call, "cancel_check_call_host");
grpc_call_combiner_set_notify_on_cancel(