From 372e53aa616ee6b3f037e0d01e615a2dc09594e8 Mon Sep 17 00:00:00 2001 From: Malte Rosenbjerg Date: Sat, 9 May 2020 20:52:44 +0200 Subject: [PATCH] Make close safe --- FFMpegCore/FFMPEG/Argument/Atoms/UnixNamedPipe.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/FFMpegCore/FFMPEG/Argument/Atoms/UnixNamedPipe.cs b/FFMpegCore/FFMPEG/Argument/Atoms/UnixNamedPipe.cs index 3cbe30d..d862b26 100644 --- a/FFMpegCore/FFMPEG/Argument/Atoms/UnixNamedPipe.cs +++ b/FFMpegCore/FFMPEG/Argument/Atoms/UnixNamedPipe.cs @@ -84,10 +84,8 @@ public Task During(CancellationToken cancellationToken) public void Close() { - if (!File.Exists(PipePath)) - throw new IOException($"Could not find pipe to close"); - - File.Delete(PipePath); + if (File.Exists(PipePath)) + File.Delete(PipePath); } public System.IO.Stream GetStream()