Skip to content

Commit 5546631

Browse files
committed
don't caer about nil contexts
1 parent e99fa51 commit 5546631

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

consume.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,7 @@ func handlerGoroutine(consumer *Consumer, msgs <-chan amqp.Delivery, consumeOpti
259259
}
260260

261261
func (consumer *Consumer) waitForHandlerCompletion(ctx context.Context) error {
262-
if ctx == nil {
263-
ctx = context.Background()
264-
} else if ctx.Err() != nil {
262+
if ctx.Err() != nil {
265263
return ctx.Err()
266264
}
267265
c := make(chan struct{})

0 commit comments

Comments
 (0)