Browse Source

Executor key not unique (#696)

Co-authored-by: Patrick Heemskerk <pheemskerk@inforit.nl>
master
patheems 4 years ago
committed by GitHub
parent
commit
755f210390
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/DotNetCore.CAP/Internal/ISubscribeInvoker.Default.cs

+ 2
- 1
src/DotNetCore.CAP/Internal/ISubscribeInvoker.Default.cs View File

@@ -35,10 +35,11 @@ namespace DotNetCore.CAP.Internal
cancellationToken.ThrowIfCancellationRequested();

var methodInfo = context.ConsumerDescriptor.MethodInfo;
var serviceTypeInfo = context.ConsumerDescriptor.ServiceTypeInfo.Name;

_logger.LogDebug("Executing subscriber method : {0}", methodInfo.Name);

var key = $"{methodInfo.Module.Name}_{methodInfo.MetadataToken}";
var key = $"{methodInfo.Module.Name}_{serviceTypeInfo}_{methodInfo.MetadataToken}";
var executor = _executors.GetOrAdd(key, x => ObjectMethodExecutor.Create(methodInfo, context.ConsumerDescriptor.ImplTypeInfo));

using var scope = _serviceProvider.CreateScope();


Loading…
Cancel
Save