Skip to content

Commit 20166e1

Browse files
authored
Merge pull request #1542 from rschmitt/overflow
SyncResponseHandlerAdapter: Prevent overflow
2 parents 778f350 + 050676c commit 20166e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/async/AsyncResponseHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void onSubscribe(Subscription subscription) {
112112
public void onNext(ByteBuffer byteBuffer) {
113113
try {
114114
baos.write(BinaryUtils.copyBytesFrom(byteBuffer));
115-
this.subscription.request(Long.MAX_VALUE);
115+
this.subscription.request(1);
116116
} catch (IOException e) {
117117
// Should never happen
118118
streamFuture.completeExceptionally(e);

0 commit comments

Comments
 (0)