Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: afc open download truncation #3

Merged
merged 1 commit into from
May 18, 2021

Conversation

jessehardy
Copy link

No description provided.

@jessehardy
Copy link
Author

Without the fix, Test_afc_Open() will just download the first 32K file content.

@electricbubble electricbubble merged commit 8c797a4 into electricbubble:main May 18, 2021
Comment on lines +61 to +63
if err = respMsg.Err(); err != nil {
return nil, fmt.Errorf("afc 'ReadDir': %w", err)
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -450,6 +453,8 @@ func (f *AfcFile) Read(b []byte) (n int, err error) {

if f.reader == nil {
f.reader = bytes.NewReader(respMsg.Payload)
} else {
f.reader.Reset(respMsg.Payload)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always reset?
why?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to read them all again?

ZhouYixun referenced this pull request in SonicCloudOrg/sonic-gidevice Nov 27, 2022
feat: get performance data for cpu/memory/gpu/fps/network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants