bug fix #86

Merged
merged 2 commits into from Dec 23, 2013

Projects

None yet

3 participants

@xuzhaokui

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

@SunRunAway SunRunAway commented on the diff Dec 21, 2013
qiniu/resumable_io.py
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)
@SunRunAway
SunRunAway Dec 21, 2013

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

@xushiwei xushiwei merged commit 240ec68 into qiniu:develop Dec 23, 2013

1 check passed

Details default The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment