File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
packages/grpc-js-xds/src/xds-stream-state Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,6 @@ export class EdsState implements XdsStreamState<ClusterLoadAssignment__Output> {
163
163
}
164
164
}
165
165
trace ( 'Received EDS updates for cluster names ' + Array . from ( allClusterNames ) ) ;
166
- this . handleMissingNames ( allClusterNames ) ;
167
166
return null ;
168
167
}
169
168
Original file line number Diff line number Diff line change @@ -163,15 +163,21 @@ export class LdsState implements XdsStreamState<Listener__Output> {
163
163
this . latestResponses = responses ;
164
164
this . latestIsV2 = isV2 ;
165
165
const allTargetNames = new Set < string > ( ) ;
166
+ const allRouteConfigNames = new Set < string > ( ) ;
166
167
for ( const message of responses ) {
167
168
allTargetNames . add ( message . name ) ;
169
+ const httpConnectionManager = decodeSingleResource ( HTTP_CONNECTION_MANGER_TYPE_URL_V3 , message . api_listener ! . api_listener ! . value ) ;
170
+ if ( httpConnectionManager . rds ) {
171
+ allRouteConfigNames . add ( httpConnectionManager . rds . route_config_name ) ;
172
+ }
168
173
const watchers = this . watchers . get ( message . name ) ?? [ ] ;
169
174
for ( const watcher of watchers ) {
170
175
watcher . onValidUpdate ( message , isV2 ) ;
171
176
}
172
177
}
173
178
trace ( 'Received RDS response with route config names ' + Array . from ( allTargetNames ) ) ;
174
179
this . handleMissingNames ( allTargetNames ) ;
180
+ this . rdsState . handleMissingNames ( allRouteConfigNames ) ;
175
181
return null ;
176
182
}
177
183
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ export class RdsState implements XdsStreamState<RouteConfiguration__Output> {
172
172
return true ;
173
173
}
174
174
175
- private handleMissingNames ( allRouteConfigNames : Set < string > ) {
175
+ handleMissingNames ( allRouteConfigNames : Set < string > ) {
176
176
for ( const [ routeConfigName , watcherList ] of this . watchers . entries ( ) ) {
177
177
if ( ! allRouteConfigNames . has ( routeConfigName ) ) {
178
178
for ( const watcher of watcherList ) {
@@ -200,7 +200,6 @@ export class RdsState implements XdsStreamState<RouteConfiguration__Output> {
200
200
}
201
201
}
202
202
trace ( 'Received RDS response with route config names ' + Array . from ( allRouteConfigNames ) ) ;
203
- this . handleMissingNames ( allRouteConfigNames ) ;
204
203
return null ;
205
204
}
206
205
You can’t perform that action at this time.
0 commit comments