Merge branch 'main' into dev

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2023-09-02 12:15:40 -07:00
9 changed files with 275 additions and 115 deletions

View File

@@ -1130,14 +1130,17 @@ func (s *Server) HandleIPQueuesz(w http.ResponseWriter, r *http.Request) {
queues := map[string]monitorIPQueue{}
s.ipQueues.Range(func(k, v interface{}) bool {
s.ipQueues.Range(func(k, v any) bool {
var pending, inProgress int
name := k.(string)
queue := v.(interface {
queue, ok := v.(interface {
len() int
inProgress() uint64
inProgress() int64
})
pending := queue.len()
inProgress := int(queue.inProgress())
if ok {
pending = queue.len()
inProgress = int(queue.inProgress())
}
if !all && (pending == 0 && inProgress == 0) {
return true
} else if qfilter != _EMPTY_ && !strings.Contains(name, qfilter) {