forked from j62/ctbrec
Reduce global connection pool size from 50 to 20
Also remove the second connectionPool call, which accidentally was left in and rendered the global connection pool useless
This commit is contained in:
parent
3b9fb87d04
commit
59697c600f
|
@ -46,7 +46,7 @@ import okhttp3.WebSocketListener;
|
|||
public abstract class HttpClient {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(HttpClient.class);
|
||||
|
||||
private static final ConnectionPool GLOBAL_HTTP_CONN_POOL = new ConnectionPool(10, 2, TimeUnit.MINUTES);
|
||||
private static final ConnectionPool GLOBAL_HTTP_CONN_POOL = new ConnectionPool(20, 2, TimeUnit.MINUTES);
|
||||
|
||||
protected OkHttpClient client;
|
||||
protected CookieJarImpl cookieJar = new CookieJarImpl();
|
||||
|
@ -125,8 +125,7 @@ public abstract class HttpClient {
|
|||
.cookieJar(cookieJar)
|
||||
.connectionPool(GLOBAL_HTTP_CONN_POOL)
|
||||
.connectTimeout(Config.getInstance().getSettings().httpTimeout, TimeUnit.MILLISECONDS)
|
||||
.readTimeout(Config.getInstance().getSettings().httpTimeout, TimeUnit.MILLISECONDS)
|
||||
.connectionPool(new ConnectionPool(50, 10, TimeUnit.MINUTES));
|
||||
.readTimeout(Config.getInstance().getSettings().httpTimeout, TimeUnit.MILLISECONDS);
|
||||
//.addInterceptor(new LoggingInterceptor());
|
||||
|
||||
ProxyType proxyType = Config.getInstance().getSettings().proxyType;
|
||||
|
|
Loading…
Reference in New Issue