Skip to content

Commit

Permalink
Don't close connection if response is sent
Browse files Browse the repository at this point in the history
Fixes quarkusio#37323

(cherry picked from commit 23f07ab)
  • Loading branch information
stuartwdouglas authored and gsmet committed May 10, 2024
1 parent 6f45e37 commit e1abaa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,9 @@ protected void handleUnrecoverableError(Throwable throwable) {

protected void endResponse() {
if (serverResponse().headWritten()) {
serverRequest().closeConnection();
if (!serverResponse().closed()) {
serverRequest().closeConnection();
}
} else {
serverResponse().setStatusCode(500).end();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ public void removeResponseHeader(String name) {

@Override
public boolean closed() {
return response.closed();
return response.ended() || response.closed();
}

@Override
Expand Down

0 comments on commit e1abaa7

Please sign in to comment.