Make close safe

Former-commit-id: 372e53aa61
This commit is contained in:
Malte Rosenbjerg 2020-05-09 20:52:44 +02:00
parent 7167b4f728
commit 5d8dfc8f7d

View file

@ -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()