activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [22/25] git commit: https://issues.apache.org/jira/browse/AMQ-4989
Date Thu, 20 Mar 2014 15:59:17 GMT
https://issues.apache.org/jira/browse/AMQ-4989


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/3987c377
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/3987c377
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/3987c377

Branch: refs/heads/activemq-5.9
Commit: 3987c3775dc1af288403a115c30d6a348a37cc44
Parents: 99b8e88
Author: Timothy Bish <tabish121@gmai.com>
Authored: Wed Jan 22 17:48:11 2014 -0500
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Thu Mar 20 11:34:36 2014 -0400

----------------------------------------------------------------------
 .../activemq/transport/tcp/TcpTransportServer.java      | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/3987c377/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
index 5e1426a..6eab645 100755
--- a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/TcpTransportServer.java
@@ -374,7 +374,16 @@ public class TcpTransportServer extends TransportServerThreadSupport
implements
                         while (!isStopped() && !isStopping()) {
                             Socket sock = socketQueue.poll(1, TimeUnit.SECONDS);
                             if (sock != null) {
-                                handleSocket(sock);
+                                try {
+                                    handleSocket(sock);
+                                } catch (Throwable thrown) {
+                                    if (!isStopping()) {
+                                        onAcceptError(new Exception(thrown));
+                                    } else if (!isStopped()) {
+                                        LOG.warn("Unexpected error thrown during accept handling:
", thrown);
+                                        onAcceptError(new Exception(thrown));
+                                    }
+                                }
                             }
                         }
 
@@ -519,6 +528,7 @@ public class TcpTransportServer extends TransportServerThreadSupport implements
         return allowLinkStealing;
     }
 
+    @Override
     public void setAllowLinkStealing(boolean allowLinkStealing) {
         this.allowLinkStealing = allowLinkStealing;
     }


Mime
View raw message