We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c106b0 commit 8f310fcCopy full SHA for 8f310fc
dotnet/test/common/Environment/TestWebServer.cs
@@ -82,14 +82,22 @@ public void Stop()
82
83
if (webserverProcess != null)
84
{
85
- webserverProcess.WaitForExit(10000);
86
- if (!webserverProcess.HasExited)
+ try
87
88
- webserverProcess.Kill();
+ webserverProcess.WaitForExit(10000);
+ if (!webserverProcess.HasExited)
89
+ {
90
+ webserverProcess.Kill();
91
+ }
92
93
+ catch (Exception)
94
95
96
+ finally
97
98
+ webserverProcess.Dispose();
99
+ webserverProcess = null;
100
}
-
- webserverProcess.Dispose();
- webserverProcess = null;
101
102
103
0 commit comments