mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Reset session stats when we cleanup the session. Closes #180
This commit is contained in:
parent
cb2794f68c
commit
fc45645280
@ -64,6 +64,8 @@ func startCleanupTimer() {
|
||||
for {
|
||||
select {
|
||||
case <-_cleanupTimer.C:
|
||||
// Reset the session count since the session is over
|
||||
_stats.SessionMaxViewerCount = 0
|
||||
resetDirectories()
|
||||
ffmpeg.ShowStreamOfflineState()
|
||||
}
|
||||
|
@ -33,11 +33,6 @@ func SetStreamAsConnected() {
|
||||
_stats.LastConnectTime = utils.NullTime{time.Now(), true}
|
||||
_stats.LastDisconnectTime = utils.NullTime{time.Now(), false}
|
||||
|
||||
timeSinceDisconnect := time.Since(_stats.LastDisconnectTime.Time).Minutes()
|
||||
if timeSinceDisconnect > 15 {
|
||||
_stats.SessionMaxViewerCount = 0
|
||||
}
|
||||
|
||||
chunkPath := config.Config.GetPublicHLSSavePath()
|
||||
if usingExternalStorage {
|
||||
chunkPath = config.Config.GetPrivateHLSSavePath()
|
||||
|
Loading…
x
Reference in New Issue
Block a user