From aae6f3a5230f7294099d4c6828e2395006d247d1 Mon Sep 17 00:00:00 2001 From: Tomaz Zavrsnik Date: Fri, 30 Aug 2024 10:51:39 +0200 Subject: [PATCH] fix(rabbitmq-rpc): Fix channel initialization for message publishing. (#809) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(rabbitmq-rpc): Fix channel initialization for message publishing. Signed-off-by: Tomaž Završnik --- executors/rabbitmq/rabbitmq.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/executors/rabbitmq/rabbitmq.go b/executors/rabbitmq/rabbitmq.go index 1e367ea3..baead3dc 100644 --- a/executors/rabbitmq/rabbitmq.go +++ b/executors/rabbitmq/rabbitmq.go @@ -157,7 +157,8 @@ func (e Executor) publishMessages(ctx context.Context, workdir string, connectio var ch *amqp.Channel var err error if connection == nil || channel == nil { - ch, conn, err := e.openChannel(ctx) + var conn *amqp.Connection + conn, ch, err = e.openChannel(ctx) if err != nil { return err }