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,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);
}