Skip to content

Commit

Permalink
Merge pull request #587 from ripienaar/monitor_pinned_fix
Browse files Browse the repository at this point in the history
Fix pin check activation
  • Loading branch information
ripienaar authored Nov 19, 2024
2 parents cec7a3a + 84d7760 commit e1d6389
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions consumer_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func (q *consumerQuery) matchWaiting(consumers []*Consumer) ([]*Consumer, error)
}

func (q *consumerQuery) matchPinned(consumers []*Consumer) ([]*Consumer, error) {
return q.cbMatcher(consumers, q.isBound != nil, func(consumer *Consumer) bool {
return q.cbMatcher(consumers, q.isPinned != nil, func(consumer *Consumer) bool {
if !consumer.IsPinnedClientPriority() {
return false
}
Expand All @@ -313,7 +313,7 @@ func (q *consumerQuery) matchPinned(consumers []*Consumer) ([]*Consumer, error)
pinned++
}
}
isPinned := pinned == len(nfo.PriorityGroups)
isPinned := pinned == len(nfo.Config.PriorityGroups)

return (!q.invert && isPinned) || (q.invert && !isPinned)
})
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/jedib0t/go-pretty/v6 v6.6.1
github.com/klauspost/compress v1.17.11
github.com/nats-io/jwt/v2 v2.7.2
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241113003423-e1b2f5d9854d
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241119025009-2dadd723643c
github.com/nats-io/nats.go v1.37.0
github.com/nats-io/nkeys v0.4.7
github.com/nats-io/nuid v1.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/nats-io/jwt/v2 v2.7.2 h1:SCRjfDLJ2q8naXp8YlGJJS5/yj3wGSODFYVi4nnwVMw=
github.com/nats-io/jwt/v2 v2.7.2/go.mod h1:kB6QUmqHG6Wdrzj0KP2L+OX4xiTPBeV+NHVstFaATXU=
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241113003423-e1b2f5d9854d h1:tT1pVgPadut3ryD7sr+Eh1nMTseYA0FliZ89/TWE8Ew=
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241113003423-e1b2f5d9854d/go.mod h1:UMry3yQXAiKBN3yh82BS4HxJWF9ht4sbRQyZ1qXODqc=
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241119025009-2dadd723643c h1:lcnWooJpdDKowjjijNW5LCTGRjInR4rpAecFVXxoOZQ=
github.com/nats-io/nats-server/v2 v2.11.0-dev.0.20241119025009-2dadd723643c/go.mod h1:UMry3yQXAiKBN3yh82BS4HxJWF9ht4sbRQyZ1qXODqc=
github.com/nats-io/nats.go v1.37.0 h1:07rauXbVnnJvv1gfIyghFEo6lUcYRY0WXc3x7x0vUxE=
github.com/nats-io/nats.go v1.37.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
Expand Down

0 comments on commit e1d6389

Please sign in to comment.