@@ -138,7 +138,7 @@ public class ApiClient {
138138
139139 private JSON json ;
140140 private String versionInfo ;
141- private static ConnectionPool defaultConnectionPool = new ConnectionPool (5 , 10 , TimeUnit .SECONDS );
141+ private static ConnectionPool connectionPool = new ConnectionPool (5 , 10 , TimeUnit .SECONDS );
142142 private HttpLoggingInterceptor loggingInterceptor ;
143143 private long computationStartTime ;
144144 private static Logger logger = LogManager .getLogger (ApiClient .class );
@@ -165,7 +165,7 @@ public static OkHttpClient initializeFinalVariables() {
165165 .connectTimeout (1 , TimeUnit .SECONDS )
166166 .writeTimeout (60 , TimeUnit .SECONDS )
167167 .readTimeout (60 , TimeUnit .SECONDS )
168- .connectionPool (ApiClient .defaultConnectionPool )
168+ .connectionPool (ApiClient .connectionPool )
169169 .addInterceptor (logging )
170170 .build ();
171171 }
@@ -245,7 +245,7 @@ public ApiClient(MerchantConfig merchantConfig) {
245245 int readTimeout = Math .max (merchantConfig .getUserDefinedReadTimeout (), 60 );
246246 int writeTimeout = Math .max (merchantConfig .getUserDefinedWriteTimeout (), 60 );
247247 int keepAliveDuration = Math .max (merchantConfig .getUserDefinedKeepAliveDuration (), 10 );
248- ConnectionPool connectionPool = new ConnectionPool (5 , keepAliveDuration , TimeUnit .SECONDS );
248+ connectionPool = new ConnectionPool (5 , keepAliveDuration , TimeUnit .SECONDS );
249249
250250 Authenticator proxyAuthenticator ;
251251
@@ -288,7 +288,7 @@ public Request authenticate(Route route, Response response) throws IOException {
288288 .readTimeout (readTimeout , TimeUnit .SECONDS )
289289 .retryOnConnectionFailure (true )
290290 .addInterceptor (new RetryInterceptor (this .apiRequestMetrics ))
291- .connectionPool (connectionPool )
291+ .connectionPool (ApiClient . connectionPool )
292292 .eventListener (new NetworkEventListener (this .getNewRandomId (), System .nanoTime ()))
293293 .build ();
294294 }
@@ -307,7 +307,7 @@ public Request authenticate(Route route, Response response) throws IOException {
307307 .connectTimeout (connectionTimeout , TimeUnit .SECONDS )
308308 .writeTimeout (writeTimeout , TimeUnit .SECONDS )
309309 .readTimeout (readTimeout , TimeUnit .SECONDS )
310- .connectionPool (connectionPool )
310+ .connectionPool (ApiClient . connectionPool )
311311 .retryOnConnectionFailure (true )
312312 .addInterceptor (new RetryInterceptor (this .apiRequestMetrics ))
313313 .eventListener (new NetworkEventListener (this .getNewRandomId (), System .nanoTime ()))
0 commit comments