File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
sdk/src/Services/S3/Custom/Transfer/Internal/_async Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -214,8 +214,8 @@ private void AbortMultipartUpload(string uploadId)
214
214
long minPartSize = request ? . PartSize != 0 ? request . PartSize : S3Constants . MinPartSize ;
215
215
var uploadPartResponses = new List < UploadPartResponse > ( ) ;
216
216
var readBuffer = ArrayPool < byte > . Shared . Rent ( READ_BUFFER_SIZE ) ;
217
- var partBuffer = ArrayPool < byte > . Shared . Rent ( ( int ) minPartSize + ( READ_BUFFER_SIZE ) ) ;
218
-
217
+ var partBuffer = ArrayPool < byte > . Shared . Rent ( ( int ) minPartSize + readBuffer . Length ) ;
218
+
219
219
MemoryStream nextUploadBuffer = new MemoryStream ( partBuffer ) ;
220
220
using ( var stream = request . InputStream )
221
221
{
@@ -232,7 +232,6 @@ private void AbortMultipartUpload(string uploadId)
232
232
// read the stream ahead and process it in the next iteration.
233
233
// this is used to set isLastPart when there is no data left in the stream.
234
234
readAheadBytesCount = await stream . ReadAsync ( readBuffer , 0 , readBuffer . Length ) . ConfigureAwait ( false ) ;
235
-
236
235
if ( ( nextUploadBuffer . Position > minPartSize || readAheadBytesCount == 0 ) )
237
236
{
238
237
if ( nextUploadBuffer . Position == 0 )
You can’t perform that action at this time.
0 commit comments