Skip to content

Commit

Permalink
Merge #2496 into 1.1.0-RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed Sep 21, 2022
2 parents 6d0c5f0 + 5a644f7 commit 0a2db01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
Expand Up @@ -772,13 +772,9 @@ final Mono<Void> send() {
if (!channel().isActive()) {
return Mono.error(AbortedException.beforeSend());
}
if (markSentHeaderAndBody()) {
HttpMessage request = newFullBodyMessage(Unpooled.EMPTY_BUFFER);
return FutureMono.deferFuture(() -> channel().writeAndFlush(request));
}
else {
return Mono.empty();
}
return FutureMono.deferFuture(() -> markSentHeaderAndBody() ?
channel().writeAndFlush(newFullBodyMessage(Unpooled.EMPTY_BUFFER)) :
channel().newSucceededFuture());
}

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

@Override
public Mono<Void> send() {
if (markSentHeaderAndBody()) {
HttpMessage response = newFullBodyMessage(EMPTY_BUFFER);
return FutureMono.deferFuture(() -> channel().writeAndFlush(response));
}
else {
return Mono.empty();
}
return FutureMono.deferFuture(() -> markSentHeaderAndBody() ?
channel().writeAndFlush(newFullBodyMessage(EMPTY_BUFFER)) :
channel().newSucceededFuture());
}

@Override
Expand Down

0 comments on commit 0a2db01

Please sign in to comment.