Skip to content

Commit

Permalink
xds/client: send connection errors to all watchers (#5054)
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl committed Dec 13, 2021
1 parent c18e2a2 commit a32d277
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions xds/internal/xdsclient/pubsub/update.go
Expand Up @@ -295,6 +295,21 @@ func (pb *Pubsub) NewConnectionError(err error) {
pb.mu.Lock()
defer pb.mu.Unlock()

for _, s := range pb.ldsWatchers {
for wi := range s {
wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err))
}
}
for _, s := range pb.rdsWatchers {
for wi := range s {
wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err))
}
}
for _, s := range pb.cdsWatchers {
for wi := range s {
wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err))
}
}
for _, s := range pb.edsWatchers {
for wi := range s {
wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err))
Expand Down

0 comments on commit a32d277

Please sign in to comment.