You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/async/SimpleHttpContentPublisher.java
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -62,12 +62,14 @@ private SubscriptionImpl(Subscriber<? super ByteBuffer> s) {
62
62
63
63
@Override
64
64
publicvoidrequest(longn) {
65
-
if (n <= 0) {
66
-
s.onError(newIllegalArgumentException("Demand must be positive"));
67
-
} elseif (running) {
68
-
s.onNext(ByteBuffer.wrap(content));
69
-
s.onComplete();
65
+
if (running) {
70
66
running = false;
67
+
if (n <= 0) {
68
+
s.onError(newIllegalArgumentException("Demand must be positive"));
Copy file name to clipboardExpand all lines: http-clients/netty-nio-client/src/main/java/software/amazon/awssdk/http/nio/netty/internal/ResponseHandler.java
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -310,14 +310,15 @@ public void subscribe(Subscriber<? super ByteBuffer> subscriber) {
310
310
subscriber.onSubscribe(newSubscription() {
311
311
@Override
312
312
publicvoidrequest(longl) {
313
-
if (l <= 0 && running) {
313
+
if (running) {
314
314
running = false;
315
-
subscriber.onError(newIllegalArgumentException("Demand must be positive!"));
316
-
} elseif (running) {
317
-
running = false;
318
-
subscriber.onNext(fullContent);
319
-
subscriber.onComplete();
320
-
executeFuture.complete(null);
315
+
if (l <= 0) {
316
+
subscriber.onError(newIllegalArgumentException("Demand must be positive!"));
0 commit comments