You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2019/01/27 22:02:59 UTC

[maven-wagon] 01/01: [WAGON-546] HttpWagon TTL not set

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch WAGON-546
in repository https://gitbox.apache.org/repos/asf/maven-wagon.git

commit dfd22586b6b934aa5a652ca32d57ed26067432fd
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Jan 27 23:02:32 2019 +0100

    [WAGON-546] HttpWagon TTL not set
---
 .../wagon/shared/http/AbstractHttpClientWagon.java   | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
index 5b909bb..1d25664 100755
--- a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
+++ b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
@@ -273,6 +273,16 @@ public abstract class AbstractHttpClientWagon
         Integer.parseInt( System.getProperty( "maven.wagon.httpconnectionManager.maxTotal", "40" ) );
 
     /**
+     * Time to live in seconds for an HTTP connection. After that time, the connection will be dropped.
+     * Intermediates tend to drop connections after some idle period. Set to -1 to maintain connections
+     * indefinitely. This value defaults to 300 seconds.
+     *
+     * @since 3.2
+     */
+    private static final long CONN_TTL =
+        Long.getLong( "maven.wagon.httpconnectionManager.ttlSeconds", 300L );
+
+    /**
      * Internal connection manager
      */
     private static HttpClientConnectionManager httpClientConnectionManager = createConnManager();
@@ -306,16 +316,6 @@ public abstract class AbstractHttpClientWagon
     private static final int MAX_BACKOFF_WAIT_SECONDS =
         Integer.parseInt( System.getProperty( "maven.wagon.httpconnectionManager.maxBackoffSeconds", "180" ) );
 
-    /**
-     * Time to live in seconds for an HTTP connection. After that time, the connection will be dropped.
-     * Intermediates tend to drop connections after some idle period. Set to -1 to maintain connections
-     * indefinitely. This value defaults to 300 seconds.
-     *
-     * @since 3.2
-     */
-    private static final long CONN_TTL =
-        Long.getLong( "maven.wagon.httpconnectionManager.ttlSeconds", 300L );
-
     protected int backoff( int wait, String url )
         throws InterruptedException, TransferFailedException
     {