Skip to content

Commit 1b827c2

Browse files
committed
[dotnet] fix bug preventing test server process from being killed when quitquitquit fails
1 parent 6785dac commit 1b827c2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dotnet/test/common/Environment/TestWebServer.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,14 @@ public void Stop()
161161
{
162162
using (var httpClient = new HttpClient())
163163
{
164-
using (var quitResponse = httpClient.GetAsync(EnvironmentManager.Instance.UrlBuilder.LocalWhereIs("quitquitquit")).GetAwaiter().GetResult())
164+
try
165+
{
166+
using (httpClient.GetAsync(EnvironmentManager.Instance.UrlBuilder.LocalWhereIs("quitquitquit")).GetAwaiter().GetResult())
167+
{
168+
169+
}
170+
}
171+
catch (HttpRequestException)
165172
{
166173

167174
}

0 commit comments

Comments
 (0)