Skip to content

Commit

Permalink
xds/client: send connection errors to all watchers (grpc#5054)
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl authored and easwars committed Dec 14, 2021
1 parent 46e883a commit 2232c6f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions xds/internal/xdsclient/pubsub/update.go
Original file line number Diff line number Diff line change
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 2232c6f

Please sign in to comment.