@@ -172,7 +172,7 @@ func (bucket Bucket) downloadFile(objectKey, filePath string, partSize int64, op
// 等待分片下载完成
completed := 0
ps := make([]downloadPart, len(parts))
- for {
+ for completed < len(parts) {
select {
case part := <-results:
completed++
@@ -371,7 +371,7 @@ func (bucket Bucket) downloadFileWithCp(objectKey, filePath string, partSize int
@@ -154,7 +154,7 @@ func (bucket Bucket) uploadFile(objectKey, filePath string, partSize int64, opti
// 等待分配分片上传完成
parts := make([]UploadPart, len(chunks))
+ for completed < len(chunks) {
@@ -408,7 +408,7 @@ func (bucket Bucket) uploadFileWithCp(objectKey, filePath string, partSize int64