code: func (s *StanServer) sendAvailableMessagesToQueue(c *channel, qs *queueState) {
  	if c == nil || qs == nil {
  		return
  	}
  
  	qs.Lock()
  	// Short circuit if no active members
  	if len(qs.subs) == 0 {
  		qs.Unlock()
  		return
  	}
  	// If redelivery at startup in progress, don't attempt to deliver new messages
  	if qs.newOnHold {
  		qs.Unlock()
  		return
  	}
  	for nextSeq := qs.lastSent + 1; qs.stalledSubCount < len(qs.subs); nextSeq++ {
  		nextMsg := s.getNextMsg(c, &nextSeq, &qs.lastSent)
  		if nextMsg == nil {
  			break
  		}
  		if _, sent, sendMore := s.sendMsgToQueueGroup(qs, nextMsg, honorMaxInFlight); !sent || !sendMore {
  			break
  		}
  	}
  	qs.Unlock()
  }
docs: // Send any messages that are ready to be sent that have been queued to the group.