Browse Source

Fixed consumer register cancellation token source null referencee bug. (#952)

master
Savorboard 3 years ago
parent
commit
3c155ce7d6
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      src/DotNetCore.CAP/Internal/IConsumerRegister.Default.cs

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

@@ -46,7 +46,7 @@ namespace DotNetCore.CAP.Internal
{
_logger = logger;
_serviceProvider = serviceProvider;
_options = serviceProvider.GetService<IOptions<CapOptions>>().Value;
_options = serviceProvider.GetRequiredService<IOptions<CapOptions>>().Value;
_cts = new CancellationTokenSource();
}

@@ -123,7 +123,6 @@ namespace DotNetCore.CAP.Internal
{
Pulse();

_cts.Dispose();
_cts = new CancellationTokenSource();
_isHealthy = true;



Loading…
Cancel
Save