From e6a0dfa21a45eaa19eda2b6084712e6c2f251476 Mon Sep 17 00:00:00 2001 From: pardahlman Date: Sun, 7 May 2017 20:34:52 +0200 Subject: [PATCH] (#224) Use channel from context if present --- src/RawRabbit/Pipe/Middleware/ConsumerMiddleware.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RawRabbit/Pipe/Middleware/ConsumerMiddleware.cs b/src/RawRabbit/Pipe/Middleware/ConsumerMiddleware.cs index 574a2d1b..45965387 100644 --- a/src/RawRabbit/Pipe/Middleware/ConsumerMiddleware.cs +++ b/src/RawRabbit/Pipe/Middleware/ConsumerMiddleware.cs @@ -25,7 +25,7 @@ public ConsumerMiddleware(IConsumerFactory consumerFactory, ConsumerOptions opti { ConsumerFactory = consumerFactory; ConfigFunc = options?.ConfigurationFunc ?? (context => context.GetConsumeConfiguration()); - ConsumerFunc = options?.ConsumerFunc ?? ((factory, token, context) => factory.CreateConsumerAsync(token: token)); + ConsumerFunc = options?.ConsumerFunc ?? ((factory, token, context) => factory.CreateConsumerAsync(context.GetChannel(), token)); } public override async Task InvokeAsync(IPipeContext context, CancellationToken token = default(CancellationToken))