Skip to content

Commit

Permalink
Resiliency fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Sep 23, 2024
1 parent d91c8ad commit 835e60c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion samples/Sample/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"My.Namespace.*" : "https://localhost",
"Http.TheActual": "https://localhost:7192"
},
"Performance": {
"PerformanceLogging": {
// * works here
"*": {
"ErrorThresholdMilliseconds": 5000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CancellationToken cancellationToken
{
var attribute = requestHandler.GetHandlerHandleMethodAttribute<TRequest, ResilientAttribute>();
attribute ??= request.GetType().GetCustomAttribute<ResilientAttribute>();
if (attribute == null)
if (attribute != null)
pipeline = pipelineProvider.GetPipeline(attribute.ConfigurationKey.ToLower());
}
if (pipeline == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ILogger<TRequest> logger
{
public async Task<TResult> Process(TRequest request, RequestHandlerDelegate<TResult> next, IRequestHandler requestHandler, CancellationToken cancellationToken)
{
var section = configuration.GetHandlerSection("Performance", request!, requestHandler);
var section = configuration.GetHandlerSection("PerformanceLogging", request!, requestHandler);
if (section == null)
return await next().ConfigureAwait(false);

Expand Down

0 comments on commit 835e60c

Please sign in to comment.