Skip to content

Commit 74d9e5a

Browse files
Fix condition to drop messages in HttpResponseFlowAdapter (#430)
1 parent 858e0d2 commit 74d9e5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk-http-vertx/src/main/java/dev/restate/sdk/http/vertx/HttpResponseFlowAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void onSubscribe(Flow.Subscription subscription) {
4040

4141
@Override
4242
public void onNext(ByteBuffer byteBuffer) {
43-
if (this.httpServerResponse.closed()) {
43+
if (this.httpServerResponse.ended()) {
4444
cancelSubscription();
4545
return;
4646
}
@@ -87,8 +87,8 @@ private void endResponse() {
8787
}
8888

8989
private void cancelSubscription() {
90-
LOG.trace("Cancelling subscription");
9190
if (this.outputSubscription != null) {
91+
LOG.trace("Cancelling subscription");
9292
Flow.Subscription outputSubscription = this.outputSubscription;
9393
this.outputSubscription = null;
9494
outputSubscription.cancel();

0 commit comments

Comments
 (0)