Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BC6E9102ED for ; Wed, 22 Jan 2014 22:48:15 +0000 (UTC) Received: (qmail 54893 invoked by uid 500); 22 Jan 2014 22:48:15 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 54859 invoked by uid 500); 22 Jan 2014 22:48:14 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 54852 invoked by uid 99); 22 Jan 2014 22:48:14 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jan 2014 22:48:14 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 83D7C8A0EA4; Wed, 22 Jan 2014 22:48:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tabish@apache.org To: commits@activemq.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: https://issues.apache.org/jira/browse/AMQ-4989 Date: Wed, 22 Jan 2014 22:48:14 +0000 (UTC) Updated Branches: refs/heads/trunk dd0c9c414 -> d8cd37030 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/d8cd3703 Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/d8cd3703 Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/d8cd3703 Branch: refs/heads/trunk Commit: d8cd37030ba51a14623abc4fbe168454b36c2970 Parents: dd0c9c4 Author: Timothy Bish Authored: Wed Jan 22 17:48:11 2014 -0500 Committer: Timothy Bish Committed: Wed Jan 22 17:48:11 2014 -0500 ---------------------------------------------------------------------- .../activemq/transport/tcp/TcpTransportServer.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq/blob/d8cd3703/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; }