File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -15275,7 +15275,7 @@ var initTask = function (cos) {
15275
15275
var task = tasks[id];
15276
15276
var waiting = task && task.state === 'waiting';
15277
15277
var running = task && (task.state === 'checking' || task.state === 'uploading');
15278
- if (waiting || running) {
15278
+ if (waiting || running || switchToState === 'canceled' && task.state === 'paused' ) {
15279
15279
if (switchToState === 'paused' && task.params.Body && typeof task.params.Body.pipe === 'function') {
15280
15280
console.error('stream not support pause');
15281
15281
return;
@@ -15287,7 +15287,7 @@ var initTask = function (cos) {
15287
15287
uploadingFileCount--;
15288
15288
startNextTask(cos);
15289
15289
}
15290
- if (switchToState === 'cancel ') {
15290
+ if (switchToState === 'canceled ') {
15291
15291
delete task.params;
15292
15292
delete task.callback;
15293
15293
}
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ var initTask = function (cos) {
56
56
var task = tasks [ id ] ;
57
57
var waiting = task && task . state === 'waiting' ;
58
58
var running = task && ( task . state === 'checking' || task . state === 'uploading' ) ;
59
- if ( waiting || running ) {
59
+ if ( waiting || running || ( switchToState === 'canceled' && task . state === 'paused' ) ) {
60
60
if ( switchToState === 'paused' && task . params . Body && typeof task . params . Body . pipe === 'function' ) {
61
61
console . error ( 'stream not support pause' ) ;
62
62
return ;
@@ -68,7 +68,7 @@ var initTask = function (cos) {
68
68
uploadingFileCount -- ;
69
69
startNextTask ( cos ) ;
70
70
}
71
- if ( switchToState === 'cancel ' ) {
71
+ if ( switchToState === 'canceled ' ) {
72
72
delete task . params ;
73
73
delete task . callback ;
74
74
}
You can’t perform that action at this time.
0 commit comments