edjCase / JsonRpc

Json Rpc Router for Asp.Net Core
MIT License
141 stars 42 forks source link

add test case GetMatchingMethod_WithRpcRoute and bugfix #88

Closed 2m0nd closed 4 years ago

2m0nd commented 4 years ago

Hi, i found bug, when two controllers has similar methods (name and parameters). Method DefaultRequestMatcher.FilterAndBuildMethodInfoByRequest get from cache other MethodInfo (first invoked) for execution action.

I write example solution for this bug, please review and approve or fix this bug more best.

2m0nd commented 4 years ago

Change cache type to ConcurrentDictionary<RpcPath?, ConcurrentDictionary<RpcRequestSignature, RpcMethodInfo[]>> and fix method FilterAndBuildMethodInfoByRequest.

Gekctek commented 4 years ago

https://www.nuget.org/packages/EdjCase.JsonRpc.Router/4.1.0