diff --git a/packages/artifact/src/internal/upload-http-client.ts b/packages/artifact/src/internal/upload-http-client.ts index e34327010b..ad57082893 100644 --- a/packages/artifact/src/internal/upload-http-client.ts +++ b/packages/artifact/src/internal/upload-http-client.ts @@ -38,7 +38,7 @@ export class UploadHttpClient { private statusReporter: UploadStatusReporter constructor() { - this.uploadHttpManager = new HttpManager(getUploadFileConcurrency()) + this.uploadHttpManager = new HttpManager(getUploadFileConcurrency() + 1) this.statusReporter = new UploadStatusReporter() } @@ -112,7 +112,8 @@ export class UploadHttpClient { }) } - const parallelUploads = [...new Array(FILE_CONCURRENCY).keys()] + // http client indices start at 1 to avoid re-using the main client + const parallelUploads = new Array(FILE_CONCURRENCY).fill(0).map((x, i) => i + 1) const failedItemsToReport: string[] = [] let currentFile = 0 let completedFiles = 0