Skip to content

Conversation

@DNVindhya
Copy link
Contributor

This PR adds null check for xdsClient in onSubChannelState.
This avoids NPE for xdsClient when LB is shutdown and onSubChannelState is called later as part of listener callback. As shutdown is racy and eventually consistent, this check would avoid calculating locality after LB is shutdown.

b/369220083

Backport of #11553

CC @apolcyn

* Added null check for xdsClient in onSubChannelState. This avoids NPE
for xdsClient when LB is shutdown and onSubChannelState is called later
as part of listener callback. As shutdown is racy and eventually consistent,
this check would avoid calculating locality after LB is shutdown.
@DNVindhya DNVindhya requested a review from ejona86 September 24, 2024 23:33
@DNVindhya DNVindhya merged commit 67cab18 into grpc:v1.67.x Sep 25, 2024
@DNVindhya DNVindhya deleted the backport-1.67-fix_wrr_npe branch September 25, 2024 17:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants