what-the-bank/sources/okhttp3/repackaged/internal/SystemPropertiesConnectionP...

27 lines
925 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package okhttp3.repackaged.internal;
import java.util.concurrent.TimeUnit;
import okhttp3.repackaged.ConnectionPool;
/* loaded from: classes6.dex */
public final class SystemPropertiesConnectionPool {
public static final ConnectionPool INSTANCE;
private static final long ajz = 300000;
static {
int parseInt;
String property = System.getProperty("http.keepAlive");
if (property == null || Boolean.parseBoolean(property)) {
String property2 = System.getProperty("http.maxConnections");
parseInt = property2 != null ? Integer.parseInt(property2) : 5;
} else {
parseInt = 0;
}
String property3 = System.getProperty("http.keepAliveDuration");
INSTANCE = new ConnectionPool(parseInt, property3 != null ? Long.parseLong(property3) : ajz, TimeUnit.MILLISECONDS);
}
private SystemPropertiesConnectionPool() {
}
}