1
0
mirror of https://github.com/rancher/steve.git synced 2025-04-27 02:51:10 +00:00

Merge pull request #41 from jakefhyde/fix-relationship-closed-channel

This commit is contained in:
Sergey Nasovich 2022-03-03 18:41:26 -05:00 committed by GitHub
commit 283b01b970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,6 +80,7 @@ func (s *SummaryCache) OnInboundRelationshipChange(ctx context.Context, schema *
s.cbs[id] = cb
go func() {
defer close(ret)
for rel := range cb {
if rel.Kind == kind &&
rel.APIVersion == apiVersion &&
@ -94,7 +95,6 @@ func (s *SummaryCache) OnInboundRelationshipChange(ctx context.Context, schema *
s.Lock()
defer s.Unlock()
close(cb)
defer close(ret)
delete(s.cbs, id)
}()