Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2011-09-20 08:00:24 +0000
committerGreg Wilkins2011-09-20 08:00:24 +0000
commit26c8cc851452b7a2f1abf21db55535b21aad6917 (patch)
treef6c2880307fd2d1a995c00940ab0a663a678d893
parentb7b567d86d0f297b3e38a166ac738f1fd84df474 (diff)
downloadorg.eclipse.jetty.project-26c8cc851452b7a2f1abf21db55535b21aad6917.tar.gz
org.eclipse.jetty.project-26c8cc851452b7a2f1abf21db55535b21aad6917.tar.xz
org.eclipse.jetty.project-26c8cc851452b7a2f1abf21db55535b21aad6917.zip
346419 testing HttpClient FDs
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
index 85b16242c9..99b4a07dfa 100644
--- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
+++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java
@@ -182,6 +182,15 @@ public class HttpClient extends HttpBuffers implements Attributes, Dumpable
*/
public ThreadPool getThreadPool()
{
+ if (_threadPool==null)
+ {
+ QueuedThreadPool pool = new QueuedThreadPool();
+ pool.setMaxThreads(16);
+ pool.setDaemon(true);
+ pool.setName("HttpClient");
+ _threadPool = pool;
+ }
+
return _threadPool;
}
@@ -420,13 +429,7 @@ public class HttpClient extends HttpBuffers implements Attributes, Dumpable
_idleTimeoutQ.setNow();
if (_threadPool == null)
- {
- QueuedThreadPool pool = new QueuedThreadPool();
- pool.setMaxThreads(16);
- pool.setDaemon(true);
- pool.setName("HttpClient");
- _threadPool = pool;
- }
+ getThreadPool();
if (_threadPool instanceof LifeCycle)
{

Back to the top