Moved Debug.WriteLine to Pipe disconnect

Former-commit-id: bbd9b7f55c
This commit is contained in:
Maxim Bagryantsev 2021-03-15 20:44:48 +03:00
parent ba8904429d
commit fdc524d516

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