From 3ef457125b11decc4e9b03dfbbc3e926725ff91c Mon Sep 17 00:00:00 2001 From: "Christopher L. Shannon (cshannon)" Date: Thu, 21 Sep 2017 08:13:42 -0400 Subject: [PATCH] AMQ-6820 - Properly handle ClosedChannelException When a ClosedChannelException occurs inside SelectorSelection properly call the transport listener onError() method to handle cleanup and logging. (cherry picked from commit 6e33507bf2fc2acea9f61e230cf8e2a9cbccc3ce) --- .../org/apache/activemq/transport/nio/SelectorSelection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorSelection.java b/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorSelection.java index a0dd210568..b0aafd2a34 100644 --- a/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorSelection.java +++ b/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorSelection.java @@ -44,7 +44,7 @@ public final class SelectorSelection { try { SelectorSelection.this.key = selectable.register(worker.selector, 0, SelectorSelection.this); } catch (Exception e) { - e.printStackTrace(); + onError(e); } } });