From 47839589f76ef9d639784aab4d9b7c20a5a2e474 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Mon, 6 Dec 2021 09:31:29 +0200 Subject: [PATCH] Don't throw an exception when finishing a closed RESTEasy response Relates to: https://github.com/quarkusio/quarkus/issues/21762#issuecomment-985995830 --- .../quarkus/resteasy/runtime/standalone/VertxHttpResponse.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxHttpResponse.java b/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxHttpResponse.java index d644c720b5881..5e5440491e2f1 100644 --- a/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxHttpResponse.java +++ b/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxHttpResponse.java @@ -138,7 +138,7 @@ private void transformHeadersList(final String key, final List valueList public void finish() throws IOException { checkException(); - if (finished || response.ended()) + if (finished || response.ended() || response.closed()) return; try { if (os != null) {