Moved Debug.WriteLine to Pipe disconnect

This commit is contained in:
Maxim Bagryantsev 2021-03-15 20:44:48 +03:00
parent fe646752d3
commit bbd9b7f55c

View file

@ -41,7 +41,6 @@ public async Task During(CancellationToken cancellationToken = default)
try
{
await ProcessDataAsync(cancellationToken);
Debug.WriteLine($"Disconnecting NamedPipeServerStream on {GetType().Name}");
}
catch (TaskCanceledException)
{
@ -49,6 +48,7 @@ public async Task During(CancellationToken cancellationToken = default)
}
finally
{
Debug.WriteLine($"Disconnecting NamedPipeServerStream on {GetType().Name}");
Pipe?.Disconnect();
}
}