Skip disconnect on cancelled

This commit is contained in:
Malte Rosenbjerg 2020-12-06 00:34:50 +01:00
parent fd723e06a9
commit db95448b14

View file

@ -42,12 +42,12 @@ public async Task During(CancellationToken cancellationToken = default)
{
await ProcessDataAsync(cancellationToken);
Debug.WriteLine($"Disconnecting NamedPipeServerStream on {GetType().Name}");
Pipe.Disconnect();
}
catch (TaskCanceledException)
{
Debug.WriteLine($"ProcessDataAsync on {GetType().Name} cancelled");
}
Pipe.Disconnect();
}
protected abstract Task ProcessDataAsync(CancellationToken token);