Browse Source

fix(consumer): use ctx in CloseWithContext

pull/166/head
Thibault Leroy 2 years ago
parent
commit
2b8632fd72
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      consume.go

+ 1
- 1
consume.go View File

@ -152,7 +152,7 @@ func (consumer *Consumer) Close() {
// Only call once.
func (consumer *Consumer) CloseWithContext(ctx context.Context) {
if consumer.options.CloseGracefully {
err := consumer.waitForHandlers(context.Background())
err := consumer.waitForHandlers(ctx)
if err != nil {
consumer.options.Logger.Warnf("error while waiting for handler to finish: %v", err)
}


Loading…
Cancel
Save