Skip to content

Commit

Permalink
[lds_rds_inline] c1
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl committed Mar 29, 2021
1 parent 2852b53 commit 75f1d68
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions xds/internal/resolver/watch_service.go
Expand Up @@ -115,11 +115,9 @@ func (w *serviceUpdateWatcher) handleLDSResp(update xdsclient.ListenerUpdate, er
// inline RDS resource.

// If there was an RDS watch, cancel it.
if w.rdsName != "" {
w.rdsName = ""
if w.rdsCancel != nil {
w.rdsCancel()
}
w.rdsName = ""
if w.rdsCancel != nil {
w.rdsCancel()
w.rdsCancel = nil
}

Expand All @@ -128,7 +126,9 @@ func (w *serviceUpdateWatcher) handleLDSResp(update xdsclient.ListenerUpdate, er
return
}

// RDS name from update is not an empty string, start RDS watch.
// RDS name from update is not an empty string, need RDS to fetch the
// routes.

if w.rdsName == update.RouteConfigName {
// If the new RouteConfigName is same as the previous, don't cancel and
// restart the RDS watch.
Expand Down

0 comments on commit 75f1d68

Please sign in to comment.