diff --git a/server/lib/live/live-manager.ts b/server/lib/live/live-manager.ts index 206e30d7d..649ad5195 100644 --- a/server/lib/live/live-manager.ts +++ b/server/lib/live/live-manager.ts @@ -483,6 +483,8 @@ class LiveManager { private async saveEndingSession (videoId: number, error: LiveVideoError | null) { const liveSession = await VideoLiveSessionModel.findCurrentSessionOf(videoId) + if (!liveSession) return + liveSession.endDate = new Date() liveSession.error = error