diff options
| author | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-04-05 09:23:44 -0400 |
|---|---|---|
| committer | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-04-05 09:23:44 -0400 |
| commit | 658e963e933319029d7cb730b2daab27e42feac5 (patch) | |
| tree | d2b64c82a4577c5d492e11c87c28b60704f45bdb /Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs | |
| parent | 4efdc63337614762baff4a343c89464cf1b0963f (diff) | |
replace 'try-finally' with 'using' where appropriate
Diffstat (limited to 'Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs')
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs index 0f2203ca0f..4738272be6 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs @@ -289,8 +289,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV /// </summary> private void OnFfMpegProcessExited(Process process, string inputFile) { - try - { + using (process) { _hasExited = true; _logFileStream?.Dispose(); @@ -315,10 +314,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV exitCode))); } } - finally - { - process.Dispose(); - } } private async void StartStreamingLog(Stream source, Stream target) |
