mirror of
https://github.com/teacat/chaturbate-dvr.git
synced 2025-10-29 16:59:59 +00:00
Close file when stream went offline so file can be moved
This commit is contained in:
parent
d71f0656e8
commit
4350359f90
@ -91,6 +91,12 @@ func (w *Channel) Run() {
|
||||
}
|
||||
w.IsOnline = false
|
||||
|
||||
// close file when offline so user can move/delete it
|
||||
if w.file != nil {
|
||||
w.file.Close()
|
||||
w.file = nil
|
||||
}
|
||||
|
||||
w.log(logTypeInfo, "channel is offline, check again 1 min later")
|
||||
<-time.After(1 * time.Minute) // 1 minute cooldown to check online status
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user