8181612: More stable connection processing
authorprappo
Wed, 26 Jul 2017 17:44:06 +0100
changeset 47422 7a4b85711089
parent 47421 f9e03aef3a49
child 47423 4fc2a4a29f3d
8181612: More stable connection processing Reviewed-by: chegar, coffeys, ahgross, joehw, rhalade
src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java
--- a/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java	Thu Jul 13 20:41:59 2017 +0000
+++ b/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java	Wed Jul 26 17:44:06 2017 +0100
@@ -115,8 +115,8 @@
                 new PrivilegedAction<Object>() {
 
                     public Object run() {
-                        vals[0] = Integer.getInteger("sun.net.client.defaultReadTimeout", 0).intValue();
-                        vals[1] = Integer.getInteger("sun.net.client.defaultConnectTimeout", 0).intValue();
+                        vals[0] = Integer.getInteger("sun.net.client.defaultReadTimeout", 300_000).intValue();
+                        vals[1] = Integer.getInteger("sun.net.client.defaultConnectTimeout", 300_000).intValue();
                         encs[0] = System.getProperty("file.encoding", "ISO8859_1");
                         return null;
                     }