Skip to content

Commit

Permalink
Merge #2496 into 2.0.0-M2
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed Sep 21, 2022
2 parents ab977d7 + 0a2db01 commit 5658c34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
Expand Up @@ -729,13 +729,9 @@ final Mono<Void> send() {
if (!channel().isActive()) {
return Mono.error(AbortedException.beforeSend());
}
if (markSentHeaderAndBody()) {
HttpMessage request = newFullBodyMessage(channel().bufferAllocator().allocate(0));
return Mono.fromCompletionStage(() -> channel().writeAndFlush(request).asStage());
}
else {
return Mono.empty();
}
return Mono.fromCompletionStage(() -> markSentHeaderAndBody() ?
channel().writeAndFlush(newFullBodyMessage(channel().bufferAllocator().allocate(0))).asStage() :
channel().newSucceededFuture().asStage());
}

final void setNettyResponse(HttpResponse nettyResponse) {
Expand Down
Expand Up @@ -417,13 +417,9 @@ public HttpHeaders responseHeaders() {

@Override
public Mono<Void> send() {
if (markSentHeaderAndBody()) {
HttpMessage response = newFullBodyMessage(channel().bufferAllocator().allocate(0));
return Mono.fromCompletionStage(() -> channel().writeAndFlush(response).asStage());
}
else {
return Mono.empty();
}
return Mono.fromCompletionStage(() -> markSentHeaderAndBody() ?
channel().writeAndFlush(newFullBodyMessage(channel().bufferAllocator().allocate(0))).asStage() :
channel().newSucceededFuture().asStage());
}

@Override
Expand Down

0 comments on commit 5658c34

Please sign in to comment.