You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2017/02/22 09:38:21 UTC

camel git commit: CAMEL-10874 - Ensure Jetty client selector count is a minimum of 1.

Repository: camel
Updated Branches:
  refs/heads/master 5dafecf98 -> 5350f010f


CAMEL-10874 - Ensure Jetty client selector count is a minimum of 1.


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

Branch: refs/heads/master
Commit: 5350f010fe8bcd68742ccbca59f0e0e992ab0efa
Parents: 5dafecf
Author: Nick Houghton <nh...@gmail.com>
Authored: Wed Feb 22 19:59:00 2017 +1100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Wed Feb 22 10:21:13 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/component/jetty/JettyHttpComponent.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5350f010/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
index 3171278..a16ddd2 100644
--- a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
+++ b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
@@ -724,7 +724,7 @@ public abstract class JettyHttpComponent extends HttpCommonComponent implements
             return new HttpClientTransportOverHTTP();
         }
 
-        int selectors = Runtime.getRuntime().availableProcessors() / 2;
+        int selectors = Math.max(1, Runtime.getRuntime().availableProcessors() / 2);
 
         if (selectors >= maxThreads) {
             selectors = maxThreads - 1;