Skip to content

Commit

Permalink
Change internalHandleStreamReady() to onl add to activeCpClients when…
Browse files Browse the repository at this point in the history
… there hasn't been an active client for that authority rather than using the generic add method all of the time.
  • Loading branch information
larry-safran committed Nov 1, 2024
1 parent 4d2e4d8 commit 23b6740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xds/src/main/java/io/grpc/xds/client/XdsClientImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -1068,8 +1068,8 @@ public void handleStreamRestarted(ServerInfo serverInfo) {
private void internalHandleStreamReady(
ServerInfo serverInfo, ControlPlaneClient controlPlaneClient, String authority) {
ControlPlaneClient activeCpClient = getActiveCpc(authority);
addCpcToAuthority(authority, controlPlaneClient);
if (activeCpClient == null) {
activeCpClients.computeIfAbsent(authority, k -> new ArrayList<>()).add(controlPlaneClient);
restartMatchingSubscriberTimers(authority);
controlPlaneClient.sendDiscoveryRequests();
return; // Since nothing was active can ignore fallback
Expand Down

0 comments on commit 23b6740

Please sign in to comment.