From e51676fb478a7583109d89c4b269af2f1413a373 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Fri, 6 Apr 2018 13:01:20 -0700 Subject: [PATCH] Policheck errors --- .../HttpConnectionContext.cs | 4 ++-- .../HttpConnectionDispatcherTests.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.AspNetCore.Http.Connections/HttpConnectionContext.cs b/src/Microsoft.AspNetCore.Http.Connections/HttpConnectionContext.cs index 12aff921a2..a2c2ba20ee 100644 --- a/src/Microsoft.AspNetCore.Http.Connections/HttpConnectionContext.cs +++ b/src/Microsoft.AspNetCore.Http.Connections/HttpConnectionContext.cs @@ -205,7 +205,7 @@ namespace Microsoft.AspNetCore.Http.Connections try { - // A poorly written application *could* in theory hang forever and it'll show up as a memory leak + // A poorly written application *could* in theory get stuck forever and it'll show up as a memory leak Log.WaitingForApplication(_logger); await applicationTask; @@ -230,7 +230,7 @@ namespace Microsoft.AspNetCore.Http.Connections try { Log.WaitingForTransportAndApplication(_logger, TransportType); - // A poorly written application *could* in theory hang forever and it'll show up as a memory leak + // A poorly written application *could* in theory get stuck forever and it'll show up as a memory leak await Task.WhenAll(applicationTask, transportTask); } finally diff --git a/test/Microsoft.AspNetCore.Http.Connections.Tests/HttpConnectionDispatcherTests.cs b/test/Microsoft.AspNetCore.Http.Connections.Tests/HttpConnectionDispatcherTests.cs index 4dce9362a8..39c30c618f 100644 --- a/test/Microsoft.AspNetCore.Http.Connections.Tests/HttpConnectionDispatcherTests.cs +++ b/test/Microsoft.AspNetCore.Http.Connections.Tests/HttpConnectionDispatcherTests.cs @@ -1271,7 +1271,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests var options = new HttpConnectionOptions(); options.AuthorizationData.Add(new AuthorizeAttribute("test")); - // would hang if EndPoint was running + // would get stuck if EndPoint was running await dispatcher.ExecuteAsync(context, options, app).OrTimeout(); Assert.Equal(StatusCodes.Status401Unauthorized, context.Response.StatusCode); @@ -1320,7 +1320,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests context.User = new ClaimsPrincipal(new ClaimsIdentity("authenticated")); - // would hang if EndPoint was running + // would get stuck if EndPoint was running await dispatcher.ExecuteAsync(context, options, app).OrTimeout(); Assert.Equal(StatusCodes.Status403Forbidden, context.Response.StatusCode); @@ -1438,7 +1438,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests // partially "authorize" user context.User = new ClaimsPrincipal(new ClaimsIdentity(new[] { new Claim(ClaimTypes.NameIdentifier, "name") })); - // would hang if EndPoint was running + // would get stuck if EndPoint was running await dispatcher.ExecuteAsync(context, options, app).OrTimeout(); Assert.Equal(StatusCodes.Status401Unauthorized, context.Response.StatusCode);