Skip to content

Commit e15d978

Browse files
menghanleaswars
authored andcommitted
xds/client: send connection errors to all watchers (#5054)
1 parent 46e883a commit e15d978

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

xds/internal/xdsclient/pubsub/update.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,21 @@ func (pb *Pubsub) NewConnectionError(err error) {
295295
pb.mu.Lock()
296296
defer pb.mu.Unlock()
297297

298+
for _, s := range pb.ldsWatchers {
299+
for wi := range s {
300+
wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err))
301+
}
302+
}
303+
for _, s := range pb.rdsWatchers {
304+
for wi := range s {
305+
wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err))
306+
}
307+
}
308+
for _, s := range pb.cdsWatchers {
309+
for wi := range s {
310+
wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err))
311+
}
312+
}
298313
for _, s := range pb.edsWatchers {
299314
for wi := range s {
300315
wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err))

0 commit comments

Comments
 (0)