Skip to content

Commit 9ad2d16

Browse files
author
Lucas McDonald
committed
m
1 parent 478e870 commit 9ad2d16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/software/amazon/encryption/s3/internal/CipherSubscriber.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void onNext(ByteBuffer byteBuffer) {
6363
// No bytes provided from upstream; to avoid blocking, send an empty buffer to the wrapped subscriber.
6464
wrappedSubscriber.onNext(ByteBuffer.allocate(0));
6565
} else {
66-
boolean atEnd = isLastPart && contentRead.get() + amountToReadFromByteBuffer >= contentLength;
66+
boolean atEnd = isLastPart && contentRead.get() >= contentLength;
6767

6868
if (atEnd) {
6969
// If all content has been read, send the final bytes in this onNext call.

0 commit comments

Comments
 (0)