Skip to content

Commit

Permalink
[Redis Broker] Wait for currently processing tasks to finish before c…
Browse files Browse the repository at this point in the history
…losing the redis pool (#552)
  • Loading branch information
gow authored May 19, 2020
1 parent 0bdd8fa commit c9512ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions v1/brokers/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ func (b *Broker) StopConsuming() {
b.delayedWG.Wait()
// Waiting for consumption to finish
b.consumingWG.Wait()
// Wait for currently processing tasks to finish as well.
b.processingWG.Wait()

if b.pool != nil {
b.pool.Close()
Expand Down

0 comments on commit c9512ae

Please sign in to comment.