summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2019-07-26 12:53:20 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2019-07-26 12:53:20 +0200
commitb2eb211c65ef3d6b059b752a3a034027ee9e81b6 (patch)
treeed9ba656dc44e9f36e8030f81fb3879a4ced1c93
parent01e8858da21c70e387ebd1f1f04b04deb4c43e58 (diff)
Duration.toSeconds() is only available on Java 9+
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
index 77a18b631ee..00f52d6337f 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
@@ -406,7 +406,7 @@ class ApacheGatewayConnection implements GatewayConnection {
}
clientBuilder.setMaxConnPerRoute(1);
clientBuilder.setMaxConnTotal(1);
- clientBuilder.setConnectionTimeToLive(connectionParams.getConnectionTimeToLive().toSeconds(), TimeUnit.SECONDS);
+ clientBuilder.setConnectionTimeToLive(connectionParams.getConnectionTimeToLive().getSeconds(), TimeUnit.SECONDS);
clientBuilder.setUserAgent(String.format("vespa-http-client (%s)", Vtag.currentVersion));
clientBuilder.setDefaultHeaders(Collections.singletonList(new BasicHeader(Headers.CLIENT_VERSION, Vtag.currentVersion)));
clientBuilder.disableContentCompression();