mirror of
https://github.com/tickstep/aliyunpan.git
synced 2025-02-02 21:27:15 +08:00
remove upload useless code
This commit is contained in:
parent
ed38002e65
commit
f8c4961608
@ -65,7 +65,6 @@ func (muer *MultiUploader) upload() (uperr error) {
|
||||
uploadClient.SetTimeout(0)
|
||||
uploadClient.SetKeepAlive(true)
|
||||
|
||||
for {
|
||||
// 阿里云盘只支持分片按顺序上传,这里正常应该是parallel = 1
|
||||
wg := waitgroup.NewWaitGroup(muer.config.Parallel)
|
||||
for {
|
||||
@ -76,7 +75,7 @@ func (muer *MultiUploader) upload() (uperr error) {
|
||||
|
||||
wer := e.(*worker)
|
||||
wg.AddDelta()
|
||||
go func() {
|
||||
go func() { // 异步上传
|
||||
defer wg.Done()
|
||||
|
||||
var (
|
||||
@ -94,7 +93,7 @@ func (muer *MultiUploader) upload() (uperr error) {
|
||||
}
|
||||
close(doneChan)
|
||||
}()
|
||||
select {
|
||||
select { // 监听上传进程,循环
|
||||
case <-muer.canceled:
|
||||
cancel()
|
||||
return
|
||||
@ -134,7 +133,6 @@ func (muer *MultiUploader) upload() (uperr error) {
|
||||
muer.updateInstanceStateChan <- struct{}{}
|
||||
}
|
||||
}()
|
||||
}
|
||||
wg.Wait()
|
||||
|
||||
// 没有任务了
|
||||
|
Loading…
Reference in New Issue
Block a user