Skip to content

Commit

Permalink
Merge pull request #553 from ripienaar/consumer_leader_fix
Browse files Browse the repository at this point in the history
Fix conditional for consumer leader find
  • Loading branch information
ripienaar authored Aug 5, 2024
2 parents bd1b67e + aa20bea commit 6b02e19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion consumer_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func (q *consumerQuery) cbMatcher(consumers []*Consumer, onlyIf bool, cb func(*C
}

func (q *consumerQuery) matchLeaderServer(consumers []*Consumer) ([]*Consumer, error) {
return q.cbMatcher(consumers, q.replicas > 0, func(consumer *Consumer) bool {
return q.cbMatcher(consumers, q.leader != "", func(consumer *Consumer) bool {
nfo, _ := consumer.LatestState()
if nfo.Cluster == nil {
return false
Expand Down

0 comments on commit 6b02e19

Please sign in to comment.