Skip to content

Commit

Permalink
fix(storage): Only allow 1 batch to run at a time
Browse files Browse the repository at this point in the history
  • Loading branch information
tyllark committed Nov 21, 2024
1 parent 2ee74bb commit bbb929f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -547,11 +547,15 @@ class S3UploadTask {
}
}

bool _isNextBatchWaiting = false;
Future<void> _startNextUploadPartsBatch({
bool resumingFromPause = false,
}) async {
// await for previous batching to complete (if any)
if (_isNextBatchWaiting) return;
_isNextBatchWaiting = true;
await _uploadPartBatchingCompleted;
_isNextBatchWaiting = false;

if (_state != StorageTransferState.inProgress) {
return;
Expand Down

0 comments on commit bbb929f

Please sign in to comment.