Skip to content

Commit

Permalink
Do not wait for listners if consumer got canceled
Browse files Browse the repository at this point in the history
  • Loading branch information
corvus-ch committed Nov 21, 2018
1 parent 2e639a6 commit 7c9000e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion consumer/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ func (c *Consumer) consume(msgs <-chan amqp.Delivery, done chan error) {
return
}
}
c.wg.Wait()
if !c.canceled {
c.wg.Wait()
}
done <- nil
}

Expand Down

0 comments on commit 7c9000e

Please sign in to comment.