0

Reduce the amount of time that stats are saved and stale viewers are purged

This commit is contained in:
Gabe Kangas 2020-06-14 17:35:57 -07:00
parent 16e8ab4edc
commit 3569cbbf39

View File

@ -30,7 +30,7 @@ type Stats struct {
func (s *Stats) Setup() { func (s *Stats) Setup() {
s.clients = make(map[string]time.Time) s.clients = make(map[string]time.Time)
statsSaveTimer := time.NewTicker(2 * time.Minute) statsSaveTimer := time.NewTicker(1 * time.Minute)
go func() { go func() {
for { for {
select { select {
@ -40,7 +40,7 @@ func (s *Stats) Setup() {
} }
}() }()
staleViewerPurgeTimer := time.NewTicker(5 * time.Second) staleViewerPurgeTimer := time.NewTicker(3 * time.Second)
go func() { go func() {
for { for {
select { select {