Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions xds/internal/clients/xdsclient/xdsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,11 @@
)

const (
// NameForServer represents the value to be passed as name when creating an xDS
// client from xDS-enabled gRPC servers. This is a well-known dedicated key
// value, and is defined in gRFC A71.
NameForServer = "#server"

defaultWatchExpiryTimeout = 15 * time.Second
name = "xds-client"
)

var (
// ErrClientClosed is returned when the xDS client is closed.
ErrClientClosed = errors.New("xds: the xDS client is closed")

defaultExponentialBackoff = backoff.DefaultExponential.Backoff
)

Expand Down Expand Up @@ -221,7 +213,7 @@
// A non-nil error is returned if an xdsChannel was not created.
func (c *XDSClient) getChannelForADS(serverConfig *ServerConfig, callingAuthority *authority) (*xdsChannel, func(), error) {
if c.done.HasFired() {
return nil, nil, ErrClientClosed
return nil, nil, errors.New("xds: the xDS client is closed")

Check warning on line 216 in xds/internal/clients/xdsclient/xdsclient.go

View check run for this annotation

Codecov / codecov/patch

xds/internal/clients/xdsclient/xdsclient.go#L216

Added line #L216 was not covered by tests
}

initLocked := func(s *channelState) {
Expand Down