From d8e6b75b5f0bf5bb6f75d38654237452ed8b1cb4 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Fri, 26 Feb 2021 22:15:46 -0800 Subject: [PATCH] No longer reset max viewer count at cleanup. Only do it at new stream start. Fixes #768 --- core/streamState.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/streamState.go b/core/streamState.go index 8920b937b..031f6493b 100644 --- a/core/streamState.go +++ b/core/streamState.go @@ -34,6 +34,7 @@ func setStreamAsConnected() { _stats.StreamConnected = true _stats.LastConnectTime = utils.NullTime{Time: time.Now(), Valid: true} _stats.LastDisconnectTime = utils.NullTime{Time: time.Now(), Valid: false} + _stats.SessionMaxViewerCount = 0 _currentBroadcast = &models.CurrentBroadcast{ LatencyLevel: data.GetStreamLatencyLevel(), @@ -169,8 +170,6 @@ func StartOfflineCleanupTimer() { _offlineCleanupTimer = time.NewTimer(5 * time.Minute) go func() { for range _offlineCleanupTimer.C { - // Reset the session count since the session is over - _stats.SessionMaxViewerCount = 0 // Set video to offline state resetDirectories() transitionToOfflineVideoStreamContent()