Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Flagsmith.FlagsmithClient/FlagsmithClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ private async Task<string> 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);
Expand Down
8 changes: 0 additions & 8 deletions Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
/// <summary>
/// Callable which will be used in the case where flags cannot be retrieved from the API or a non existent feature is requested.
/// </summary>
public Func<string, Flag>? DefaultFlagHandler { get; set; }

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Engine)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.FlagsmithClient)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 6.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Client.Test)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 7.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.EngineTest)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 8.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
/// <summary>
/// Provide logger for logging polling info & errors which is only applicable when client side evalution is enabled and analytics errors.
/// </summary>
Expand All @@ -85,14 +85,6 @@
set => _timeout = TimeSpan.FromSeconds(value ?? 100);
}

/// <summary>
/// Timeout duration to use for HTTP requests.
/// </summary>
public TimeSpan Timeout
{
get => _timeout;
set => _timeout = value;
}
/// <summary>
/// Total http retries for every failing request before throwing the final error.
/// </summary>
Expand All @@ -115,7 +107,7 @@
/// <summary>
/// Handler for offline mode operations.
/// </summary>
public BaseOfflineHandler? OfflineHandler { get; set; }

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Engine)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.FlagsmithClient)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 6.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Client.Test)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 7.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.EngineTest)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 8.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

/// <summary>
/// Http client used for flagsmith-API requests.
Expand Down
Loading