1
0
mirror of synced 2024-11-24 11:43:12 +01:00

Fixed #35: NullReferenceException in Cancel

This commit is contained in:
Mark van Renswoude 2021-10-08 15:50:59 +02:00
parent 46e498b071
commit 847e6a6d83

View File

@ -143,13 +143,13 @@ namespace Tapeti.Connection
{ {
var queues = config.Bindings.GroupBy(binding => binding.QueueName); var queues = config.Bindings.GroupBy(binding => binding.QueueName);
consumerTags.AddRange(await Task.WhenAll(queues.Select(async group => consumerTags.AddRange((await Task.WhenAll(queues.Select(async group =>
{ {
var queueName = group.Key; var queueName = group.Key;
var consumer = new TapetiConsumer(cancellationToken, config, queueName, group); var consumer = new TapetiConsumer(cancellationToken, config, queueName, group);
return await clientFactory().Consume(cancellationToken, queueName, consumer); return await clientFactory().Consume(cancellationToken, queueName, consumer);
}))); }))).Where(t => t != null));
} }