From 08ae7770bb2b7ac73fb5c39cec0239fa04eeb0c3 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Thu, 16 Feb 2012 00:40:55 +0000 Subject: [PATCH] fix: https://issues.apache.org/jira/browse/AMQ-3721 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1244809 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/transport/stomp/StompNIOTransport.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransport.java b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransport.java index 15b1b43c89..db66059926 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransport.java @@ -126,10 +126,11 @@ public class StompNIOTransport extends TcpTransport { protected void doStop(ServiceStopper stopper) throws Exception { try { - selection.close(); - } catch (Exception e) { - e.printStackTrace(); + if (selection != null) { + selection.close(); + } + } finally { + super.doStop(stopper); } - super.doStop(stopper); } }