-
Notifications
You must be signed in to change notification settings - Fork 75
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
Fixdownloadbug #363
Fixdownloadbug #363
Conversation
c = NewChunk(m1.Size) | ||
c.Len = m1.Size | ||
c.Offset = m1.Offset | ||
n, err := io.ReadFull(part, c.Data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug主要在这里。
Read读数据其实读不完也会返回。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一个multipart作为一个chunk?这样是否和上传时每个chunk的大小有区别呢?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没啥区别。multipart只不过是用boundary分割的一段buffer而已。
} | ||
log.V(2).Infof("remote chunk is same as local chunk:%s\n\n", c.String()) | ||
if errc == io.EOF || errm == io.EOF { | ||
offset += sm.Len |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个之前的offset也有问题。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM++
Fix #364