Skip to content

Commit

Permalink
Fix for the SDS update failure
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitKatyal-Sophos committed Dec 12, 2022
1 parent 5a401ce commit 60e490f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pkg/server/delta/v3/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,18 @@ func (s *server) processDelta(str stream.DeltaStream, reqCh <-chan *discovery.De
watch := watches.deltaWatches[typ]
watch.nonce = nonce

watch.state.SetResourceVersions(resp.GetNextVersionMap())
if !watch.state.IsWildcard() {
for k, hash := range resp.GetNextVersionMap() {
if currHash, found := watch.state.GetResourceVersions()[k]; found {
if currHash != hash {
watch.state.GetResourceVersions()[k] = hash
}
}
}
} else {
watch.state.SetResourceVersions(resp.GetNextVersionMap())
}

watches.deltaWatches[typ] = watch
case req, more := <-reqCh:
// input stream ended or errored out
Expand Down

0 comments on commit 60e490f

Please sign in to comment.