From 3a51748713202f9ea5bb75493aa2f631bf83818d Mon Sep 17 00:00:00 2001 From: Rostislav Svoboda Date: Tue, 25 Oct 2022 10:44:49 +0200 Subject: [PATCH] Ignore the error when the stream is closed and try to continue (cherry picked from commit 7b8733e38b10a990c6debebcc0c5d3942b31abc9) --- .../main/java/io/quarkus/deployment/OutputFilter.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/OutputFilter.java b/core/deployment/src/main/java/io/quarkus/deployment/OutputFilter.java index 1d3af6e190939d..41d96c5df132d1 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/OutputFilter.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/OutputFilter.java @@ -6,8 +6,11 @@ import java.io.InputStreamReader; import java.util.function.Function; +import org.jboss.logging.Logger; + public class OutputFilter implements Function { private final StringBuilder builder = new StringBuilder(); + private static final Logger log = Logger.getLogger(OutputFilter.class); @Override public Runnable apply(InputStream is) { @@ -20,7 +23,11 @@ public Runnable apply(InputStream is) { builder.append(line); } } catch (IOException e) { - throw new RuntimeException("Error reading stream.", e); + if (e.getMessage().contains("Stream closed")) { + log.warn("Stream is closed, ignoring and trying to continue"); + } else { + throw new RuntimeException("Error reading stream.", e); + } } }; }