aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2017-01-18 10:08:54 -0800
committerGravatar Mark D. Roth <roth@google.com>2017-01-18 10:08:54 -0800
commit1339a389e23e1a917cdfaa8bf9734b4a1af57266 (patch)
tree2fc49f0beb1d02c89e02411e5949ed10406da6a3 /src/core/ext
parentd58a985a56a561df49e668af1153c69ae5b8f4ac (diff)
Fix handshaker shutdown bug.
Diffstat (limited to 'src/core/ext')
-rw-r--r--src/core/ext/client_channel/http_connect_handshaker.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c
index c8f614681f..622d236320 100644
--- a/src/core/ext/client_channel/http_connect_handshaker.c
+++ b/src/core/ext/client_channel/http_connect_handshaker.c
@@ -272,6 +272,11 @@ static void http_connect_handshaker_do_handshake(
const grpc_arg* arg =
grpc_channel_args_find(args->args, GRPC_ARG_HTTP_CONNECT_SERVER);
if (arg == NULL) {
+ // Set shutdown to true so that subsequent calls to
+ // http_connect_handshaker_shutdown() do nothing.
+ gpr_mu_lock(&handshaker->mu);
+ handshaker->shutdown = true;
+ gpr_mu_unlock(&handshaker->mu);
grpc_closure_sched(exec_ctx, on_handshake_done, GRPC_ERROR_NONE);
return;
}