From 3569cbbf39259487f26dbc5009f721c5f4afaf05 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sun, 14 Jun 2020 17:35:57 -0700 Subject: [PATCH] Reduce the amount of time that stats are saved and stale viewers are purged --- stats.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stats.go b/stats.go index e7cbd7ece..15afb7cef 100644 --- a/stats.go +++ b/stats.go @@ -30,7 +30,7 @@ type Stats struct { func (s *Stats) Setup() { s.clients = make(map[string]time.Time) - statsSaveTimer := time.NewTicker(2 * time.Minute) + statsSaveTimer := time.NewTicker(1 * time.Minute) go func() { for { select { @@ -40,7 +40,7 @@ func (s *Stats) Setup() { } }() - staleViewerPurgeTimer := time.NewTicker(5 * time.Second) + staleViewerPurgeTimer := time.NewTicker(3 * time.Second) go func() { for { select {