Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class ProjectionCoordinator: IProjectionCoordinator

private readonly ResiliencePipeline _resilience;
private readonly TimeProvider _timeProvider;
private CancellationTokenSource _cancellation;
private CancellationTokenSource? _cancellation;

private ImHashMap<string, IProjectionDaemon> _daemons = ImHashMap<string, IProjectionDaemon>.Empty;
private Task? _runner;
Expand Down Expand Up @@ -102,7 +102,10 @@ public Task StartAsync(CancellationToken cancellationToken)
public async Task PauseAsync()
{
_logger.LogInformation("Pausing ProjectionCoordinator");
await _cancellation.CancelAsync().ConfigureAwait(false);
if (_cancellation != null)
{
await _cancellation.CancelAsync().ConfigureAwait(false);
}

await pauseDistributor().ConfigureAwait(false);

Expand Down
Loading