aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2016-04-20 15:20:11 -0700
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2016-04-20 15:20:11 -0700
commitf1ec553c3289f2b0b6e7524706c777575bc2af89 (patch)
tree88adde4cb0b02d234bda02d229e956d1b00acceb /src/core/ext
parent247d0035411345d962435cf0f5ff965fd889632b (diff)
parent418b9f9a42bdc4d29a8ac2654da42076aea85cb8 (diff)
Merge pull request #6182 from ctiller/frenchmans-bay
Fix crash in pick_first.c if all subchannels turn out to be bad
Diffstat (limited to 'src/core/ext')
-rw-r--r--src/core/ext/lb_policy/pick_first/pick_first.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c
index 5926f9d70b..0d215cd196 100644
--- a/src/core/ext/lb_policy/pick_first/pick_first.c
+++ b/src/core/ext/lb_policy/pick_first/pick_first.c
@@ -109,7 +109,7 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
if (selected != NULL) {
grpc_connected_subchannel_notify_on_state_change(
exec_ctx, selected, NULL, NULL, &p->connectivity_changed);
- } else {
+ } else if (p->num_subchannels > 0) {
grpc_subchannel_notify_on_state_change(
exec_ctx, p->subchannels[p->checking_subchannel], NULL, NULL,
&p->connectivity_changed);