fix: move group push work off topic loop
This commit is contained in:
@@ -904,6 +904,7 @@ func (s *Session) publish(msg *ClientComMessage) {
|
||||
|
||||
if sub := s.getSub(msg.RcptTo); sub != nil {
|
||||
// This is a post to a subscribed topic. The message is sent to the topic only
|
||||
msg.queuedAt = time.Now()
|
||||
select {
|
||||
case sub.broadcast <- msg:
|
||||
immetrics.ObserveInternalQueueEnqueue("session_topic_publish", len(sub.broadcast), cap(sub.broadcast), true)
|
||||
@@ -1722,6 +1723,7 @@ func (s *Session) note(msg *ClientComMessage) {
|
||||
|
||||
if sub := s.getSub(msg.RcptTo); sub != nil {
|
||||
// Pings can be sent to subscribed topics only
|
||||
msg.queuedAt = time.Now()
|
||||
select {
|
||||
case sub.broadcast <- msg:
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user