aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/core/client_config/lb_policies/pick_first.c7
-rw-r--r--templates/test/core/end2end/end2end_defs.include2
-rw-r--r--test/core/end2end/end2end_nosec_tests.c2
-rw-r--r--test/core/end2end/end2end_tests.c2
4 files changed, 6 insertions, 7 deletions
diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c
index 9beaeba2b4..4a90b07002 100644
--- a/src/core/client_config/lb_policies/pick_first.c
+++ b/src/core/client_config/lb_policies/pick_first.c
@@ -368,13 +368,12 @@ void pf_notify_on_state_change(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
void pf_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
grpc_closure *closure) {
pick_first_lb_policy *p = (pick_first_lb_policy *)pol;
- gpr_mu_lock(&p->mu);
- if (p->selected) {
- grpc_connected_subchannel_ping(exec_ctx, p->selected, closure);
+ grpc_connected_subchannel *selected = GET_SELECTED(p);
+ if (selected) {
+ grpc_connected_subchannel_ping(exec_ctx, selected, closure);
} else {
grpc_exec_ctx_enqueue(exec_ctx, closure, 0);
}
- gpr_mu_unlock(&p->mu);
}
static const grpc_lb_policy_vtable pick_first_lb_policy_vtable = {
diff --git a/templates/test/core/end2end/end2end_defs.include b/templates/test/core/end2end/end2end_defs.include
index e95bd4a8b6..18a33b7d32 100644
--- a/templates/test/core/end2end/end2end_defs.include
+++ b/templates/test/core/end2end/end2end_defs.include
@@ -61,7 +61,7 @@ void grpc_end2end_tests(int argc, char **argv,
continue;
}
% endfor
- gpr_log(GPR_DEBUG, "not a test: '%%s'", argv[i]);
+ gpr_log(GPR_DEBUG, "not a test: '%s'", argv[i]);
abort();
}
}</%def> \ No newline at end of file
diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c
index c0bea7bb36..e1974a7d65 100644
--- a/test/core/end2end/end2end_nosec_tests.c
+++ b/test/core/end2end/end2end_nosec_tests.c
@@ -259,7 +259,7 @@ void grpc_end2end_tests(int argc, char **argv,
trailing_metadata(config);
continue;
}
- gpr_log(GPR_DEBUG, "not a test: '%%s'", argv[i]);
+ gpr_log(GPR_DEBUG, "not a test: '%s'", argv[i]);
abort();
}
}
diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c
index 4c3a018ad2..271b81efeb 100644
--- a/test/core/end2end/end2end_tests.c
+++ b/test/core/end2end/end2end_tests.c
@@ -265,7 +265,7 @@ void grpc_end2end_tests(int argc, char **argv,
trailing_metadata(config);
continue;
}
- gpr_log(GPR_DEBUG, "not a test: '%%s'", argv[i]);
+ gpr_log(GPR_DEBUG, "not a test: '%s'", argv[i]);
abort();
}
}