Skip to content

Commit 621bdb0

Browse files
committed
revert: remove TimeSpan Timeout option
1 parent 62efdfa commit 621bdb0

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

Flagsmith.FlagsmithClient/FlagsmithClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ private async Task<string> GetJson(HttpMethod method, string url, string? body =
284284
request.Content = new StringContent(body, Encoding.UTF8, "application/json");
285285
}
286286

287-
var cancellationTokenSource = new CancellationTokenSource(_config.Timeout);
287+
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(_config.RequestTimeout ?? 100));
288288
HttpResponseMessage response = await _config.HttpClient.SendAsync(request, cancellationTokenSource.Token).ConfigureAwait(false);
289289
return response.EnsureSuccessStatusCode();
290290
}).ConfigureAwait(false)).Content.ReadAsStringAsync().ConfigureAwait(false);

Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,6 @@ public Double? RequestTimeout
8585
set => _timeout = TimeSpan.FromSeconds(value ?? 100);
8686
}
8787

88-
/// <summary>
89-
/// Timeout duration to use for HTTP requests.
90-
/// </summary>
91-
public TimeSpan Timeout
92-
{
93-
get => _timeout;
94-
set => _timeout = value;
95-
}
9688
/// <summary>
9789
/// Total http retries for every failing request before throwing the final error.
9890
/// </summary>

0 commit comments

Comments
 (0)