From 7d8639431b5405d7516670e275ecbf18d087a15d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Nov 2025 13:20:06 +0000 Subject: [PATCH 1/4] Initial plan From e9867a1a8db98e7c8bf7f81e476d270e0620d375 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Nov 2025 13:32:52 +0000 Subject: [PATCH 2/4] Fix line number reference in NamedPipeServer comment Co-authored-by: nohwnd <5735905+nohwnd@users.noreply.github.com> --- src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs b/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs index 53f21f87384c..da2eff285730 100644 --- a/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs +++ b/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs @@ -236,7 +236,7 @@ public void Dispose() // If the loop task is null at this point we have race condition, means that the task didn't start yet and we already dispose. // This is unexpected and we throw an exception. - // To close gracefully we need to ensure that the client closed the stream line 103. + // To close gracefully we need to ensure that the client closed the stream and the InternalLoopAsync method has exited. if (!_loopTask!.Wait(TimeSpan.FromSeconds(90))) { throw new InvalidOperationException(CliCommandStrings.InternalLoopAsyncDidNotExitSuccessfullyErrorMessage); From d2f8da77edf631186320df13d4edd7fef57cf2a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Tue, 11 Nov 2025 16:30:35 +0100 Subject: [PATCH 3/4] Apply suggestion from @nohwnd --- src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs b/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs index da2eff285730..35b6b9bd6352 100644 --- a/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs +++ b/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs @@ -236,7 +236,7 @@ public void Dispose() // If the loop task is null at this point we have race condition, means that the task didn't start yet and we already dispose. // This is unexpected and we throw an exception. - // To close gracefully we need to ensure that the client closed the stream and the InternalLoopAsync method has exited. + // To close gracefully we need to ensure that the client closed the stream in the InternalLoopAsync method (there is comment `// The client has disconnected`). if (!_loopTask!.Wait(TimeSpan.FromSeconds(90))) { throw new InvalidOperationException(CliCommandStrings.InternalLoopAsyncDidNotExitSuccessfullyErrorMessage); From 0b51d9703cf751aab66821840129a8d552a39efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Wed, 12 Nov 2025 08:51:02 +0100 Subject: [PATCH 4/4] Update src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs b/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs index 35b6b9bd6352..6df6de1c1278 100644 --- a/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs +++ b/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs @@ -236,7 +236,7 @@ public void Dispose() // If the loop task is null at this point we have race condition, means that the task didn't start yet and we already dispose. // This is unexpected and we throw an exception. - // To close gracefully we need to ensure that the client closed the stream in the InternalLoopAsync method (there is comment `// The client has disconnected`). + // To close gracefully we need to ensure that the client closed the stream and the InternalLoopAsync method has exited (indicated by the `// The client has disconnected` comment). if (!_loopTask!.Wait(TimeSpan.FromSeconds(90))) { throw new InvalidOperationException(CliCommandStrings.InternalLoopAsyncDidNotExitSuccessfullyErrorMessage);