Skip to content

Commit

Permalink
Merge pull request #118 from tecAmoRaller/fix/EndpointMetadata
Browse files Browse the repository at this point in the history
[fix] Endpoint Metadata Validation
  • Loading branch information
Rast1234 authored Sep 12, 2024
2 parents a31a13a + 476d9c8 commit d8d0c5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tochka.JsonRpc.Server/Routing/JsonRpcMatcherPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ private static bool ValidateCandidates(CandidateSet candidates, ICall call)
for (var i = 0; i < candidates.Count; i++)
{
var candidate = candidates[i];
var jsonRpcMetadata = candidate.Endpoint.Metadata.GetMetadata<JsonRpcMethodAttribute>()!;
var methodMatches = call.Method == jsonRpcMetadata.Method;
var jsonRpcMetadata = candidate.Endpoint.Metadata.GetMetadata<JsonRpcMethodAttribute>();
var methodMatches = call.Method == jsonRpcMetadata?.Method;
candidates.SetValidity(i, methodMatches);
if (methodMatches)
{
Expand Down

0 comments on commit d8d0c5c

Please sign in to comment.