We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 478e870 commit 9ad2d16Copy full SHA for 9ad2d16
src/main/java/software/amazon/encryption/s3/internal/CipherSubscriber.java
@@ -63,7 +63,7 @@ public void onNext(ByteBuffer byteBuffer) {
63
// No bytes provided from upstream; to avoid blocking, send an empty buffer to the wrapped subscriber.
64
wrappedSubscriber.onNext(ByteBuffer.allocate(0));
65
} else {
66
- boolean atEnd = isLastPart && contentRead.get() + amountToReadFromByteBuffer >= contentLength;
+ boolean atEnd = isLastPart && contentRead.get() >= contentLength;
67
68
if (atEnd) {
69
// If all content has been read, send the final bytes in this onNext call.
0 commit comments