|
|
|
@ -614,14 +614,19 @@ static void destroy_transport(grpc_transport *gt) { |
|
|
|
|
unref_transport(t); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void close_transport_locked(transport *t) { |
|
|
|
|
if (!t->closed) { |
|
|
|
|
t->closed = 1; |
|
|
|
|
if (t->ep) { |
|
|
|
|
grpc_endpoint_shutdown(t->ep); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void close_transport(grpc_transport *gt) { |
|
|
|
|
transport *t = (transport *)gt; |
|
|
|
|
gpr_mu_lock(&t->mu); |
|
|
|
|
GPR_ASSERT(!t->closed); |
|
|
|
|
t->closed = 1; |
|
|
|
|
if (t->ep) { |
|
|
|
|
grpc_endpoint_shutdown(t->ep); |
|
|
|
|
} |
|
|
|
|
close_transport_locked(t); |
|
|
|
|
gpr_mu_unlock(&t->mu); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1313,6 +1318,7 @@ static void drop_connection(transport *t) { |
|
|
|
|
if (t->error_state == ERROR_STATE_NONE) { |
|
|
|
|
t->error_state = ERROR_STATE_SEEN; |
|
|
|
|
} |
|
|
|
|
close_transport_locked(t); |
|
|
|
|
end_all_the_calls(t); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|