0

When I look at the source code of HttpClient which in turn uses org.apache.http.client.config.RequestConfig, I see below -

-taken from org.apache.http.client.config.RequestConfig.java

/**
     * Determines the timeout in milliseconds until a connection is established.
     * <p>
     * A timeout value of zero is interpreted as an infinite timeout.
     * A negative value is interpreted as undefined (system default if applicable).
     * </p>
     * <p>
     * Default: {@code -1}
     * </p>
     */
    public int getConnectTimeout() {
        return connectTimeout;
    }

I am not sure what System default here means. Does it mean that it will try to read System Properties and use that value. If this is the case then I will assume it will read connectTimeout system property and used the value of this property for this timeout config.

If I am wrong then kindly let me know what System default here means.

Edit - like @elliott-frisch pointed. Default means OS default. But now I am wondering where i can find these values for various Operating Systems. Like for Linux (Ubuntu/CentOS etc) and for Windows.

samshers
  • 1
  • 6
  • 37
  • 84
  • 1
    Correct. You cannot be sure what system default means. No. It will be a default on each operating system. And might change between releases of the operating system(s). – Elliott Frisch Jan 16 '22 at 17:27
  • @ElliottFrisch, gr8 ++1. Your comment pushes me one step ahead. I have edited my Q based on ur comment. – samshers Jan 16 '22 at 17:33

0 Answers0