Reset the directories when the stream gets disconnected (#152)
* Reset the directories when the stream gets disconnected * Cleanup after a delay Co-authored-by: Gabe Kangas <gabek@real-ity.com>
This commit is contained in:
@@ -27,6 +27,8 @@ func GetStatus() models.Status {
|
||||
|
||||
//SetStreamAsConnected sets the stream as connected
|
||||
func SetStreamAsConnected() {
|
||||
stopCleanupTimer()
|
||||
|
||||
_stats.StreamConnected = true
|
||||
_stats.LastConnectTime = utils.NullTime{time.Now(), true}
|
||||
_stats.LastDisconnectTime = utils.NullTime{time.Now(), false}
|
||||
@@ -50,4 +52,5 @@ func SetStreamAsDisconnected() {
|
||||
_stats.LastDisconnectTime = utils.NullTime{time.Now(), true}
|
||||
|
||||
ffmpeg.ShowStreamOfflineState()
|
||||
startCleanupTimer()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user