From fd1bdad0e22715cb589d3bbee9ed9805989ac544 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Sun, 29 Sep 2019 19:06:14 -0400 Subject: [PATCH] Ignore exception when attempting to kill ffmpeg that has exited A race condition where this code attempts to kill an already exited ffmpeg process is possible. This results in unnecessary error logging. This change replaces the generic exception handling with the above mentioned exception. No log output is produced. --- MediaBrowser.Api/ApiEntryPoint.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs index a223a4fe38..7dca7e8147 100644 --- a/MediaBrowser.Api/ApiEntryPoint.cs +++ b/MediaBrowser.Api/ApiEntryPoint.cs @@ -610,9 +610,8 @@ namespace MediaBrowser.Api process.Kill(); } } - catch (Exception ex) + catch (InvalidOperationException) { - Logger.LogError(ex, "Error killing transcoding job for {Path}", job.Path); } } }