Skip to content

Commit

Permalink
improve http middleware 'next' callback call
Browse files Browse the repository at this point in the history
  • Loading branch information
alec1o committed Dec 10, 2024
1 parent d373eaf commit 2e969d6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/http/partials/Server/HTTP.MiddlewareDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ public MiddlewareDescriptor

public void Execute(IHTTP.ServerRequest request, IHTTP.ServerResponse response)
{
if (Next == null || Next.Callback == null) return;

Next.Callback(request, response, () => Next.Execute(request, response));
Next?.Callback(request, response, () => Next?.Execute(request, response));
}
}
}
Expand Down

0 comments on commit 2e969d6

Please sign in to comment.