We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd58d40 commit 66bced6Copy full SHA for 66bced6
pkg/server/sotw/v3/xds.go
@@ -149,11 +149,13 @@ func (s *server) process(str stream.Stream, reqCh chan *discovery.DiscoveryReque
149
sw.watches.recompute(s.ctx, reqCh)
150
default:
151
// Channel n -> these are the dynamic list of responders that correspond to the stream request typeURL
152
- if !ok {
+ // nil is used to close the streams in the caches
153
+ if value.IsNil() || !ok {
154
// Receiver channel was closed. TODO(jpeach): probably cancel the watch or something?
155
return status.Errorf(codes.Unavailable, "resource watch %d -> failed", index)
156
}
157
158
+ // If a non cache.Response arrived here, there are serious issues
159
res := value.Interface().(cache.Response)
160
nonce, err := sw.send(res)
161
if err != nil {
0 commit comments