Skip to content

Commit

Permalink
fix consumer stop
Browse files Browse the repository at this point in the history
  • Loading branch information
Allenxuxu committed Jun 28, 2021
1 parent d07dcb0 commit 7230676
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,11 @@ func (r *Consumer) onConnClose(c *Conn) {

// we were the last one (and stopping)
if atomic.LoadInt32(&r.stopFlag) == 1 {
_, opened := <-r.reconnectStopChan
if left == 0 && !opened {
r.stopHandlers()
}

return
}

Expand Down

0 comments on commit 7230676

Please sign in to comment.