Skip to content

Commit 9f853b0

Browse files
committed
fix
1 parent eca6b22 commit 9f853b0

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

Qiniu/IO/Resumable/ResumablePut.cs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ public class ResumablePut
3232
/// 上传完成事件
3333
/// </summary>
3434
public event EventHandler<CallRet> PutFinished;
35-
3635
/// <summary>
3736
/// 上传Failure事件
3837
/// </summary>
3938
public event EventHandler<CallRet> PutFailure;
40-
4139
/// <summary>
4240
/// 进度提示事件
4341
/// </summary>
@@ -98,15 +96,15 @@ public CallRet PutFile (string upToken, string localFile, string key)
9896
lock (fs) {
9997
fs.Seek (i * BLOCKSIZE, SeekOrigin.Begin);
10098
fs.Read (byteBuf, 0, readLen);
99+
}
100+
BlkputRet blkRet = ResumableBlockPut (client, byteBuf, i, readLen);
101101

102-
BlkputRet blkRet = ResumableBlockPut (client, byteBuf, i, readLen);
103-
104-
if (blkRet == null) {
105-
extra.OnNotifyErr (new PutNotifyErrorEvent (i, readLen, "Make Block Error"));
106-
} else {
107-
extra.OnNotify (new PutNotifyEvent (i, readLen, extra.Progresses [i]));
108-
}
109-
}
102+
if (blkRet == null) {
103+
extra.OnNotifyErr (new PutNotifyErrorEvent (i, readLen, "Make Block Error"));
104+
} else {
105+
extra.OnNotify (new PutNotifyEvent (i, readLen, extra.Progresses [i]));
106+
}
107+
110108
});
111109
if (string.IsNullOrEmpty (key)) {
112110
key = UNDEFINED_KEY;

0 commit comments

Comments
 (0)