Skip to content

Commit

Permalink
Fix condition to drop messages in HttpResponseFlowAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper committed Nov 29, 2024
1 parent 858e0d2 commit 9a6e902
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void onSubscribe(Flow.Subscription subscription) {

@Override
public void onNext(ByteBuffer byteBuffer) {
if (this.httpServerResponse.closed()) {
if (this.httpServerResponse.ended()) {
cancelSubscription();
return;
}
Expand Down Expand Up @@ -87,8 +87,8 @@ private void endResponse() {
}

private void cancelSubscription() {
LOG.trace("Cancelling subscription");
if (this.outputSubscription != null) {
LOG.trace("Cancelling subscription");
Flow.Subscription outputSubscription = this.outputSubscription;
this.outputSubscription = null;
outputSubscription.cancel();
Expand Down

0 comments on commit 9a6e902

Please sign in to comment.