Skip to content

Commit b186971

Browse files
committed
Merge branch 'feature/timeout-cleanups' of https://github.com/kendallb/RestSharp into kendallb-feature/timeout-cleanups
2 parents d3e1d59 + 5bbdcf3 commit b186971

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/RestSharp/RestClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public RestClient(HttpClient httpClient, RestClientOptions options, bool dispose
124124
public RestClient(HttpMessageHandler handler, bool disposeHandler = true) : this(new HttpClient(handler, disposeHandler), true) { }
125125

126126
void ConfigureHttpClient(HttpClient httpClient) {
127-
if (Options.Timeout > 0) httpClient.Timeout = TimeSpan.FromMilliseconds(Options.Timeout);
127+
if (Options.MaxTimeout > 0) httpClient.Timeout = TimeSpan.FromMilliseconds(Options.MaxTimeout);
128128
httpClient.DefaultRequestHeaders.UserAgent.ParseAdd(Options.UserAgent);
129129
}
130130

src/RestSharp/RestClientOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public RestClientOptions(string baseUrl) : this(new Uri(Ensure.NotEmptyString(ba
7575
public bool FollowRedirects { get; set; } = true;
7676
public CookieContainer? CookieContainer { get; set; }
7777
public string UserAgent { get; set; } = DefaultUserAgent;
78-
public int Timeout { get; set; }
78+
public int MaxTimeout { get; set; }
7979
public Encoding Encoding { get; set; } = Encoding.UTF8;
8080

8181
/// <summary>

0 commit comments

Comments
 (0)