From caa4e702d05cdd7cd09987df102cd738c3e958d4 Mon Sep 17 00:00:00 2001
From: Craig Tiller <craig.tiller@gmail.com>
Date: Tue, 1 Dec 2015 06:55:25 -0800
Subject: [PATCH] Shutdown connector at the right time

---
 src/core/client_config/subchannel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c
index 9f802f1cc3..a0e51d57ec 100644
--- a/src/core/client_config/subchannel.c
+++ b/src/core/client_config/subchannel.c
@@ -234,6 +234,7 @@ static void disconnect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) {
   gpr_mu_lock(&c->mu);
   GPR_ASSERT(!c->disconnected);
   c->disconnected = 1;
+  grpc_connector_shutdown(exec_ctx, c->connector);
   con = GET_CONNECTED_SUBCHANNEL(c, no_barrier);
   if (con != NULL) {
     GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, con, "connection");
-- 
GitLab