From 5546631dfc053505fee69fdaa3423e556ac3a62b Mon Sep 17 00:00:00 2001 From: wagslane Date: Fri, 21 Jun 2024 09:52:34 -0600 Subject: [PATCH] don't caer about nil contexts --- consume.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/consume.go b/consume.go index f1c9829..805ae66 100644 --- a/consume.go +++ b/consume.go @@ -259,9 +259,7 @@ func handlerGoroutine(consumer *Consumer, msgs <-chan amqp.Delivery, consumeOpti } func (consumer *Consumer) waitForHandlerCompletion(ctx context.Context) error { - if ctx == nil { - ctx = context.Background() - } else if ctx.Err() != nil { + if ctx.Err() != nil { return ctx.Err() } c := make(chan struct{})