|
|
@ -505,7 +505,8 @@ void grpc_connected_subchannel_ping(grpc_exec_ctx *exec_ctx, |
|
|
|
elem->filter->start_transport_op(exec_ctx, elem, &op); |
|
|
|
elem->filter->start_transport_op(exec_ctx, elem, &op); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void publish_transport(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { |
|
|
|
static void publish_transport_locked(grpc_exec_ctx *exec_ctx, |
|
|
|
|
|
|
|
grpc_subchannel *c) { |
|
|
|
size_t channel_stack_size; |
|
|
|
size_t channel_stack_size; |
|
|
|
grpc_connected_subchannel *con; |
|
|
|
grpc_connected_subchannel *con; |
|
|
|
grpc_channel_stack *stk; |
|
|
|
grpc_channel_stack *stk; |
|
|
@ -541,8 +542,6 @@ static void publish_transport(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { |
|
|
|
grpc_closure_init(&sw_subchannel->closure, subchannel_on_child_state_changed, |
|
|
|
grpc_closure_init(&sw_subchannel->closure, subchannel_on_child_state_changed, |
|
|
|
sw_subchannel); |
|
|
|
sw_subchannel); |
|
|
|
|
|
|
|
|
|
|
|
gpr_mu_lock(&c->mu); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (c->disconnected) { |
|
|
|
if (c->disconnected) { |
|
|
|
gpr_mu_unlock(&c->mu); |
|
|
|
gpr_mu_unlock(&c->mu); |
|
|
|
gpr_free(sw_subchannel); |
|
|
|
gpr_free(sw_subchannel); |
|
|
@ -575,7 +574,6 @@ static void publish_transport(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { |
|
|
|
grpc_connectivity_state_set(exec_ctx, &c->state_tracker, GRPC_CHANNEL_READY, |
|
|
|
grpc_connectivity_state_set(exec_ctx, &c->state_tracker, GRPC_CHANNEL_READY, |
|
|
|
"connected"); |
|
|
|
"connected"); |
|
|
|
|
|
|
|
|
|
|
|
gpr_mu_unlock(&c->mu); |
|
|
|
|
|
|
|
gpr_free((void *)filters); |
|
|
|
gpr_free((void *)filters); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -644,13 +642,11 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, |
|
|
|
bool iomgr_success) { |
|
|
|
bool iomgr_success) { |
|
|
|
grpc_subchannel *c = arg; |
|
|
|
grpc_subchannel *c = arg; |
|
|
|
|
|
|
|
|
|
|
|
if (c->connecting_result.transport != NULL) { |
|
|
|
|
|
|
|
publish_transport(exec_ctx, c); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GRPC_SUBCHANNEL_WEAK_REF(c, "connected"); |
|
|
|
GRPC_SUBCHANNEL_WEAK_REF(c, "connected"); |
|
|
|
gpr_mu_lock(&c->mu); |
|
|
|
gpr_mu_lock(&c->mu); |
|
|
|
if (c->disconnected) { |
|
|
|
if (c->connecting_result.transport != NULL) { |
|
|
|
|
|
|
|
publish_transport_locked(exec_ctx, c); |
|
|
|
|
|
|
|
} else if (c->disconnected) { |
|
|
|
GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); |
|
|
|
GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); |
|
|
|
gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); |
|
|
|