diff options
Diffstat (limited to 'recording')
-rw-r--r-- | recording/runner.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/recording/runner.go b/recording/runner.go index cee4325..a4693fb 100644 --- a/recording/runner.go +++ b/recording/runner.go @@ -85,7 +85,7 @@ func doTask(ctx context.Context, task *TaskConfig) error { for !cancelled { cancelled = record(recorderCtx, bi, task) } - logger.Printf("Task is cancelled. (room %v)\n", task.RoomId) + logger.Printf("Task is cancelled. Stop recording. (room %v)\n", task.RoomId) }() lastStatusIsLiving = true case WatcherLiveStop: @@ -159,7 +159,11 @@ func record( logger.Printf("Recording live stream to file \"%v\"...", filePath) err = bi.CopyLiveStream(ctx, task.RoomId, streamSource, file) - cancelled = false + cancelled = err == nil + if !cancelled { + // real error happens + logger.Printf("Error when copying live stream: %v\n", err) + } return } |