Set BinderTransport connectivity state tracker initial state to READY (#27979)

By default the state is set to IDLE, which is not desired because

1. The actual connectivity state when transport is created is READY
2. The binder tansport channel won't be able to recover from IDLE state
for some reason and cause the channel to stuck when used on multiple
thread. We have an internal bug tracking this issue.
pull/27989/head
Ming-Chuan 3 years ago committed by GitHub
parent d342a86f2c
commit 4ab1608ee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/core/ext/transport/binder/transport/binder_transport.cc

@ -699,8 +699,9 @@ grpc_binder_transport::grpc_binder_transport(
std::shared_ptr<grpc::experimental::binder::SecurityPolicy> security_policy) std::shared_ptr<grpc::experimental::binder::SecurityPolicy> security_policy)
: is_client(is_client), : is_client(is_client),
combiner(grpc_combiner_create()), combiner(grpc_combiner_create()),
state_tracker(is_client ? "binder_transport_client" state_tracker(
: "binder_transport_server"), is_client ? "binder_transport_client" : "binder_transport_server",
GRPC_CHANNEL_READY),
refs(1, nullptr) { refs(1, nullptr) {
gpr_log(GPR_INFO, __func__); gpr_log(GPR_INFO, __func__);
base.vtable = get_vtable(); base.vtable = get_vtable();

Loading…
Cancel
Save