You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/04/28 09:11:08 UTC

[2/4] camel git commit: CAMEL-9920 - Handle SocketTimeoutException on accept

CAMEL-9920 - Handle SocketTimeoutException on accept


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8d648983
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8d648983
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8d648983

Branch: refs/heads/master
Commit: 8d64898311b808bda25f164594a3a97237957bb0
Parents: e9b0119
Author: Quinn Stevenson <qu...@pronoia-solutions.com>
Authored: Wed Apr 27 13:11:23 2016 -0600
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Apr 28 09:09:14 2016 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/mllp/MllpTcpServerConsumer.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8d648983/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
index c025f80..7a95dc2 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
@@ -205,6 +205,10 @@ public class MllpTcpServerConsumer extends DefaultConsumer {
                     Socket socket = null;
                     try {
                         socket = serverSocket.accept();
+                    } catch (SocketTimeoutException timeoutEx ) {
+                        // Didn't get a new connection - keep waiting for one
+                        log.debug( "Timeout waiting for client connection - keep listening");
+                        continue;
                     } catch (SocketException socketEx) {
                         // This should happen if the component is closed while the accept call is blocking
                         if (serverSocket.isBound()) {