Repository: camel Updated Branches: refs/heads/camel-2.18.x fa8aeb34b -> 4532655a7
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/4532655a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4532655a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4532655a Branch: refs/heads/camel-2.18.x Commit: 4532655a7189287da30cae94dbb16470c8d2105d Parents: fa8aeb3 Author: Nick Houghton <nhoug...@gmail.com> Authored: Wed Feb 22 19:59:00 2017 +1100 Committer: Andrea Cosentino <anco...@gmail.com> Committed: Wed Feb 22 10:39: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/4532655a/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 cd34b7b..a574666 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 @@ -737,7 +737,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;