diff --git a/src/HtmlAgilityPack.Shared/HtmlWeb.cs b/src/HtmlAgilityPack.Shared/HtmlWeb.cs index 1c7fcad3..e1077ca5 100644 --- a/src/HtmlAgilityPack.Shared/HtmlWeb.cs +++ b/src/HtmlAgilityPack.Shared/HtmlWeb.cs @@ -803,12 +803,12 @@ internal static HttpClient GetSharedHttpClient(string userAgent) public DecompressionMethods AutomaticDecompression { get; set; } /// - /// Gets or sets the timeout value in milliseconds. + /// Gets or sets the timeout value in milliseconds. Must be greater than zero. /// public int Timeout { get { return _timeout; } - set { if (value < 0) { _timeout = 0; } else { _timeout = value; } } + set { if (value <= 0) { throw new ArgumentOutOfRangeException(); } else { _timeout = value; } } } ///