Skip to content

8297424: java/net/httpclient/AsyncExecutorShutdown.java fails in AssertionError due to misplaced assert #3684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -552,13 +552,13 @@ public void onSubscribe(Flow.Subscription s) {
closed = this.closed;
if (!closed) {
this.subscription = s;
assert buffers.remainingCapacity() > 1; // should contain at least 2
}
}
if (closed) {
s.cancel();
return;
}
assert buffers.remainingCapacity() > 1; // should contain at least 2
if (debug.on())
debug.log("onSubscribe: requesting "
+ Math.max(1, buffers.remainingCapacity() - 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,9 @@ private void schedule() {
if (subscriber == null) {
// can't process anything yet
return;
} else {
if (debug.on()) debug.log("subscribing user subscriber");
subscriber.onSubscribe(userSubscription);
}
if (debug.on()) debug.log("subscribing user subscriber");
subscriber.onSubscribe(userSubscription);
}
while (!inputQ.isEmpty()) {
Http2Frame frame = inputQ.peek();
Expand Down Expand Up @@ -420,7 +419,7 @@ CompletableFuture<T> receiveData(BodySubscriber<T> bodySubscriber, Executor exec
responseBodyCF.completeExceptionally(t);
}

// ensure that the body subscriber will be subsribed and onError() is
// ensure that the body subscriber will be subscribed and onError() is
// invoked
pendingResponseSubscriber = bodySubscriber;
sched.runOrSchedule(); // in case data waiting already to be processed, or error
Expand Down Expand Up @@ -600,9 +599,9 @@ void incoming_reset(ResetFrame frame) {
Flow.Subscriber<?> subscriber =
responseSubscriber == null ? pendingResponseSubscriber : responseSubscriber;
if (response == null && subscriber == null) {
// we haven't receive the headers yet, and won't receive any!
// we haven't received the headers yet, and won't receive any!
// handle reset now.
handleReset(frame, subscriber);
handleReset(frame, null);
} else {
// put it in the input queue in order to read all
// pending data frames first. Indeed, a server may send
Expand Down