From 0755cb89e752edbfac10e72610f6b44ea93debf5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 18 Jul 2022 15:49:15 +0200 Subject: [PATCH] Prevent logging error when saving delete live --- server/lib/live/live-manager.ts | 2 ++ 1 file changed, 2 insertions(+) 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