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

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