|
|
|
@ -917,8 +917,8 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, |
|
|
|
|
GPR_ASSERT(glb_policy->cc_factory != NULL); |
|
|
|
|
|
|
|
|
|
arg = grpc_channel_args_find(args->args, GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS); |
|
|
|
|
glb_policy->lb_call_timeout_ms = grpc_channel_arg_get_integer( |
|
|
|
|
arg, (grpc_integer_options){0, 0, INT_MAX}); |
|
|
|
|
glb_policy->lb_call_timeout_ms = |
|
|
|
|
grpc_channel_arg_get_integer(arg, (grpc_integer_options){0, 0, INT_MAX}); |
|
|
|
|
|
|
|
|
|
// Make sure that GRPC_ARG_LB_POLICY_NAME is set in channel args,
|
|
|
|
|
// since we use this to trigger the client_load_reporting filter.
|
|
|
|
@ -1279,10 +1279,10 @@ static void lb_call_init_locked(grpc_exec_ctx *exec_ctx, |
|
|
|
|
grpc_slice host = grpc_slice_from_copied_string(glb_policy->server_name); |
|
|
|
|
gpr_timespec deadline = |
|
|
|
|
glb_policy->lb_call_timeout_ms == 0 |
|
|
|
|
? gpr_inf_future(GPR_CLOCK_MONOTONIC) |
|
|
|
|
: gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), |
|
|
|
|
gpr_time_from_millis(glb_policy->lb_call_timeout_ms, |
|
|
|
|
GPR_TIMESPAN)); |
|
|
|
|
? gpr_inf_future(GPR_CLOCK_MONOTONIC) |
|
|
|
|
: gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), |
|
|
|
|
gpr_time_from_millis(glb_policy->lb_call_timeout_ms, |
|
|
|
|
GPR_TIMESPAN)); |
|
|
|
|
glb_policy->lb_call = grpc_channel_create_pollset_set_call( |
|
|
|
|
exec_ctx, glb_policy->lb_channel, NULL, GRPC_PROPAGATE_DEFAULTS, |
|
|
|
|
glb_policy->base.interested_parties, |
|
|
|
|