mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
reduce connection keepalive timeout to 30s, default is 20 minutes
This commit is contained in:
@@ -31,6 +31,14 @@ import nl.altindag.ssl.SSLFactory;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class HttpGetter {
|
public class HttpGetter {
|
||||||
|
|
||||||
|
static {
|
||||||
|
// reduce connection keepalive timeout to 30s, default is 20 minutes
|
||||||
|
// https://stackoverflow.com/a/53620696/1885506
|
||||||
|
// will no longer be needed with Java 21+
|
||||||
|
// https://bugs.openjdk.org/browse/JDK-8297030
|
||||||
|
System.setProperty("jdk.httpclient.keepalive.timeout", "30");
|
||||||
|
}
|
||||||
|
|
||||||
private final HttpClient client;
|
private final HttpClient client;
|
||||||
private final String userAgent;
|
private final String userAgent;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user