From: <mgu...@us...> - 2012-11-20 07:27:10
|
Revision: 7741 http://sourceforge.net/p/htmlunit/code/7741 Author: mguillem Date: 2012-11-20 07:27:05 +0000 (Tue, 20 Nov 2012) Log Message: ----------- Change default network timeout from infinite wait to 90 seconds. Modified Paths: -------------- trunk/htmlunit/src/changes/changes.xml trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebClient.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebClientOptions.java Modified: trunk/htmlunit/src/changes/changes.xml =================================================================== --- trunk/htmlunit/src/changes/changes.xml 2012-11-19 14:46:05 UTC (rev 7740) +++ trunk/htmlunit/src/changes/changes.xml 2012-11-20 07:27:05 UTC (rev 7741) @@ -8,6 +8,9 @@ <body> <release version="2.12" date="???" description="Bugfixes"> + <action type="udpate" dev="mguillem"> + Change default network timeout from infinite wait to 90 seconds. + </action> <action type="fix" dev="asashour"> JavaScript: function name referenced before its declaration should be visible (IE). </action> Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebClient.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebClient.java 2012-11-19 14:46:05 UTC (rev 7740) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebClient.java 2012-11-20 07:27:05 UTC (rev 7741) @@ -1730,11 +1730,8 @@ } /** - * <p>Sets the timeout of the {@link WebConnection}. Set to zero (the default) for an infinite wait.</p> + * <p>Sets the timeout of the {@link WebConnection}.</p> * - * <p>Note: The timeout is used twice. The first is for making the socket connection, the second is - * for data retrieval. If the time is critical you must allow for twice the time specified here.</p> - * * @param timeout the value of the timeout in milliseconds * @deprecated as of 2.11, please use {@link #getOptions()}.{@link WebClientOptions#setTimeout setTimeout()} * instead. Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebClientOptions.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebClientOptions.java 2012-11-19 14:46:05 UTC (rev 7740) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebClientOptions.java 2012-11-20 07:27:05 UTC (rev 7741) @@ -42,7 +42,7 @@ private boolean activeXNative_; private String homePage_ = "http://htmlunit.sf.net/"; private ProxyConfig proxyConfig_; - private int timeout_; + private int timeout_ = 90000; // like Firefox 16 default's value for network.http.connection-timeout private boolean useInsecureSSL_ = false; // default is secure SSL @@ -342,7 +342,7 @@ /** * Gets the timeout value for the {@link WebConnection}. - * + * The default timeout is 90 seconds (it was 0 up to HtmlUnit-2.11). * @return the timeout value in milliseconds * @see WebClientOptions#getTimeout(int) */ @@ -351,7 +351,7 @@ } /** - * <p>Sets the timeout of the {@link WebConnection}. Set to zero (the default) for an infinite wait.</p> + * <p>Sets the timeout of the {@link WebConnection}. Set to zero for an infinite wait.</p> * * <p>Note: The timeout is used twice. The first is for making the socket connection, the second is * for data retrieval. If the time is critical you must allow for twice the time specified here.</p> |