Skip to content

bug fix #86

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

Merged
merged 2 commits into from
Dec 23, 2013
Merged

bug fix #86

merged 2 commits into from
Dec 23, 2013

Conversation

xuzhaokui
Copy link
Contributor

修复了断点续传的bug,bug原因:mkblk和bput使用了同一个rpc.Client实例,但是该实例中的host被指定为UP_HOST,所以bput会上传到 UP_HOST,而不是mkblk返回的host

while extra.progresses[index]["offset"] < block_size:
offset = extra.progresses[index]["offset"]
chunk = block[offset: offset+extra.chunk_size-1]
crc32 = gen_crc32(chunk)
chunk = bytearray(chunk)
extra.progresses[index], err = putblock(client, extra.progresses[index], chunk)

extra.progresses[index], err = putblock(bput_client, extra.progresses[index], chunk)
Copy link
Contributor

Choose a reason for hiding this comment

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

每次bput应该用上次bput(mkblk)反回的uphost

xushiwei added a commit that referenced this pull request Dec 23, 2013
@xushiwei xushiwei merged commit 240ec68 into qiniu:develop Dec 23, 2013
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.

3 participants