Remove goroutine

This commit is contained in:
binwiederhier
2026-03-02 13:28:37 -05:00
parent 0e6b467cf0
commit 31f0234098

View File

@@ -2327,9 +2327,7 @@ func (s *Server) updateAndWriteStats(messagesCount int64) {
s.messagesHistory = s.messagesHistory[1:]
}
s.mu.Unlock()
go func() {
if err := s.messageCache.UpdateStats(messagesCount); err != nil {
log.Tag(tagManager).Err(err).Warn("Cannot write messages stats")
}
}()
if err := s.messageCache.UpdateStats(messagesCount); err != nil {
log.Tag(tagManager).Err(err).Warn("Cannot write messages stats")
}
}