diff --git a/Flagsmith.FlagsmithClient/FlagsmithClient.cs b/Flagsmith.FlagsmithClient/FlagsmithClient.cs index 406ddbe..3409468 100644 --- a/Flagsmith.FlagsmithClient/FlagsmithClient.cs +++ b/Flagsmith.FlagsmithClient/FlagsmithClient.cs @@ -284,7 +284,7 @@ private async Task GetJson(HttpMethod method, string url, string? body = request.Content = new StringContent(body, Encoding.UTF8, "application/json"); } - var cancellationTokenSource = new CancellationTokenSource(_config.Timeout); + var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(_config.RequestTimeout ?? 100)); HttpResponseMessage response = await _config.HttpClient.SendAsync(request, cancellationTokenSource.Token).ConfigureAwait(false); return response.EnsureSuccessStatusCode(); }).ConfigureAwait(false)).Content.ReadAsStringAsync().ConfigureAwait(false); diff --git a/Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs b/Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs index 6268835..8a75be0 100644 --- a/Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs +++ b/Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs @@ -85,14 +85,6 @@ public Double? RequestTimeout set => _timeout = TimeSpan.FromSeconds(value ?? 100); } - /// - /// Timeout duration to use for HTTP requests. - /// - public TimeSpan Timeout - { - get => _timeout; - set => _timeout = value; - } /// /// Total http retries for every failing request before throwing the final error. ///