Skip to content

Commit

Permalink
bugfix: fix incomplete data copy of resource filter (openyurtio#452)
Browse files Browse the repository at this point in the history
Signed-off-by: SataQiu <[email protected]>
  • Loading branch information
SataQiu authored Sep 6, 2021
1 parent 97e48fd commit 46da2bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/yurthub/cachemanager/cache_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func (cm *cacheManager) saveListObject(ctx context.Context, info *apirequest.Req

list, err := s.Decode(b)
if err != nil || list == nil {
klog.Errorf("failed to decode response in saveOneObject %v", err)
klog.Errorf("failed to decode response in saveListObject %v", err)
return err
}

Expand Down
3 changes: 1 addition & 2 deletions pkg/yurthub/filter/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ func (dr *filterReadCloser) Read(p []byte) (int, error) {
return n, nil
}
} else {
n := copy(p, dr.data.Bytes())
return n, io.EOF
return dr.data.Read(p)
}
}

Expand Down

0 comments on commit 46da2bb

Please sign in to comment.