JAL-3332 Sensible default timeout values for network connections (8s connect_timeout...
[jalview.git] / getdown / src / getdown / core / src / main / java / com / threerings / getdown / data / SysProps.java
index 0d96ecb..8550461 100644 (file)
@@ -9,6 +9,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import com.threerings.getdown.util.VersionUtil;
+import com.threerings.getdown.data.Build;
 
 /**
  * This class encapsulates all system properties that are read and processed by Getdown. Don't
@@ -106,7 +107,7 @@ public class SysProps
       * to more quickly timeout its startup update check if the server with which it is
       * communicating is not available. Usage: {@code -Dconnect_timeout=N}. */
     public static int connectTimeout () {
-        return Integer.getInteger("connect_timeout", 0);
+        return Integer.getInteger("connect_timeout", Build.defaultConnectTimeout());
     }
 
     /** Specifies the read timeout (in seconds) to use when downloading all files from the server.
@@ -114,7 +115,7 @@ public class SysProps
       * update process wil fail. Setting the timeout to zero (or a negative value) will disable it.
       * Usage: {@code -Dread_timeout=N}. */
     public static int readTimeout () {
-        return Integer.getInteger("read_timeout", 30);
+        return Integer.getInteger("read_timeout", Build.defaultReadTimeout());
     }
 
     /** Returns the number of threads used to perform digesting and verifying operations in