Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

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

Gabe Kangas3569cbbf3925
diff --git a/stats.go b/stats.go
index e7cbd7ece8..15afb7cefc 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 {