xdsclient: use top-level server list if authority specific list is empty (#5491)

This commit is contained in:
Easwar Swaminathan 2022-07-12 11:37:52 -07:00 committed by GitHub
parent e02f27d969
commit 9ba66f1b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ func (c *clientImpl) findAuthority(n *xdsresource.Name) (_ *authority, unref fun
if !ok {
return nil, nil, fmt.Errorf("xds: failed to find authority %q", authority)
}
config = cfg.XDSServer
if cfg.XDSServer != nil {
config = cfg.XDSServer
}
}
a, err := c.newAuthorityLocked(config)