diff options
author | Keuin <[email protected]> | 2023-07-29 21:23:33 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-07-29 21:23:33 +0800 |
commit | 2f0ef363eabce940314dc33f5966335642722fa2 (patch) | |
tree | 2aaf04c39c1f2b6fe31d3d98b56372f072f50a88 /recording/runner.go | |
parent | 110301a975e43739192577166d089e28c22ae266 (diff) |
Distinguish waiting and recording status
Diffstat (limited to 'recording/runner.go')
-rw-r--r-- | recording/runner.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/recording/runner.go b/recording/runner.go index 7bf3790..ca4fe48 100644 --- a/recording/runner.go +++ b/recording/runner.go @@ -42,7 +42,7 @@ var errLiveEnded = errs.NewError(errs.LiveEnded) // During the process, its status may change. // Note: this method is blocking. func (t *RunningTask) runTaskWithAutoRestart() { - t.status = StRunning + t.status = StWaiting loop: for { err := tryRunTask(t) @@ -171,6 +171,7 @@ func tryRunTask(t *RunningTask) error { case nil: // live is started, start recording // (now the watcher should have stopped) + t.status = StRecording return func() error { var err error run := true |