Skip to content

Commit

Permalink
Merge pull request #20547 from stuartwdouglas/20458-fix
Browse files Browse the repository at this point in the history
Report throwable on write
  • Loading branch information
patriot1burke authored Oct 7, 2021
2 parents b131a12 + b9229a3 commit 708170e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,15 @@ Buffer createBuffer(ByteBuf data) {
public void write(ByteBuf data, boolean last) throws IOException {
if (last && data == null) {
request.response().end();
//if there is a problem we still try and end, but then throw to report to the caller
if (throwable != null) {
throw new IOException(throwable);
}
return;
}
if (throwable != null) {
throw new IOException(throwable);
}
try {
//do all this in the same lock
synchronized (request.connection()) {
Expand Down

0 comments on commit 708170e

Please sign in to comment.