Make close safe

This commit is contained in:
Malte Rosenbjerg 2020-05-09 20:52:44 +02:00
parent 8787ccaa8d
commit 372e53aa61

View file

@ -84,9 +84,7 @@ public Task During(CancellationToken cancellationToken)
public void Close()
{
if (!File.Exists(PipePath))
throw new IOException($"Could not find pipe to close");
if (File.Exists(PipePath))
File.Delete(PipePath);
}