Skip to content

Commit c53f350

Browse files
committed
Thread pool reverted, cached thread pool contains keepAlive timeout 60seconds and behaves better, Fixes android-async-http#382
1 parent cd5f0e8 commit c53f350

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/java/com/loopj/android/http/AsyncHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public AsyncHttpClient(SchemeRegistry schemeRegistry) {
210210

211211
ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager(httpParams, schemeRegistry);
212212

213-
threadPool = Executors.newFixedThreadPool(DEFAULT_MAX_CONNECTIONS);
213+
threadPool = Executors.newCachedThreadPool();
214214
requestMap = new WeakHashMap<Context, List<WeakReference<Future<?>>>>();
215215
clientHeaderMap = new HashMap<String, String>();
216216

0 commit comments

Comments
 (0)