This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 10312a7335e73a06459c478bb855174700c29b7b Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Mon Jan 15 11:05:33 2024 +0100 CAMEL-20297 camel-netty: do not swallow interrupted exceptions --- .../src/main/java/org/apache/camel/component/netty/NettyProducer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java index 4433173e26a..725c310dbb2 100644 --- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java @@ -374,6 +374,9 @@ public class NettyProducer extends DefaultAsyncProducer { // but we can try to get a result with a 0 timeout, then netty will throw the caused // exception wrapped in an outer exception channelFuture.get(0, TimeUnit.MILLISECONDS); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + cause = e.getCause(); } catch (Exception e) { cause = e.getCause(); }
