Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhipsa20 committed Nov 13, 2024
1 parent d758049 commit d640de2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions pkg/cache/v3/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -780,10 +780,11 @@ func (cache *snapshotCache) respondDeltaWatches(ctx context.Context, info *statu
for _, key := range info.orderedDeltaWatches {
watch := info.deltaWatches[key.ID]

// Check if Checker allows to proceed
//if !ops.Checker(GetEnvoyNodeStr(watch.Request.GetNode()), ops) {
// return nil
//}
//Check if Checker allows to proceed
nodeStr := GetEnvoyNodeStr(watch.Request.GetNode())
if ops != nil && ops.Checker != nil && !ops.Checker(nodeStr, ops) {
return nil
}

res, err := cache.respondDelta(
ctx,
Expand All @@ -804,9 +805,10 @@ func (cache *snapshotCache) respondDeltaWatches(ctx context.Context, info *statu
} else {
for id, watch := range info.deltaWatches {
// Check if Checker allows to proceed
//if !ops.Checker(GetEnvoyNodeStr(watch.Request.GetNode()), ops) {
// return nil
//}
nodeStr := GetEnvoyNodeStr(watch.Request.GetNode())
if ops != nil && ops.Checker != nil && !ops.Checker(nodeStr, ops) {
return nil
}
res, err := cache.respondDelta(
ctx,
snapshot,
Expand Down

0 comments on commit d640de2

Please sign in to comment.