only log expiry if applicable
parent
6bfe4a9779
commit
7c5b9c0e62
|
@ -1420,8 +1420,12 @@ func (s *Server) execManager() {
|
|||
defer s.mu.Unlock()
|
||||
for _, t := range s.topics {
|
||||
subs := t.SubscribersCount()
|
||||
expiryMessage := ""
|
||||
if subs == 0 {
|
||||
expiryTime := time.Until(t.lastVisitorExpires)
|
||||
log.Tag(tagManager).Trace("- topic %s: %d subscribers, expires in %s", t.ID, subs, expiryTime)
|
||||
expiryMessage = ", expires in " + expiryTime.String()
|
||||
}
|
||||
log.Tag(tagManager).Trace("- topic %s: %d subscribers%s", t.ID, subs, expiryMessage)
|
||||
msgs, exists := messageCounts[t.ID]
|
||||
if t.Stale() && (!exists || msgs == 0) {
|
||||
log.Tag(tagManager).Trace("Deleting empty topic %s", t.ID)
|
||||
|
|
Loading…
Reference in New Issue