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:09 UTC

[3/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/389e9770
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/389e9770
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/389e9770

Branch: refs/heads/camel-2.17.x
Commit: 389e977098bf8106f9ead5e4e379e91d625a47e5
Parents: 7a72ca6
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:10:52 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/389e9770/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()) {