Skip to content

Commit

Permalink
Allow for infinite timespan on the Timeout property.
Browse files Browse the repository at this point in the history
  • Loading branch information
basicn86 committed Jul 4, 2023
1 parent 6c89e3f commit 0c448c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HtmlAgilityPack.Shared/HtmlWeb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ internal static HttpClient GetSharedHttpClient(string userAgent)
public int Timeout
{
get { return _timeout; }
set { if (value <= 0) { throw new ArgumentOutOfRangeException(); } else { _timeout = value; } }
set { if (value <= 0 && value != -1) { throw new ArgumentOutOfRangeException(); } else { _timeout = value; } }
}

/// <summary>
Expand Down

0 comments on commit 0c448c6

Please sign in to comment.