From ace9a0d4147cd1b68a446218d7b518f7dab72f10 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Thu, 19 Apr 2018 19:14:39 -0700 Subject: [PATCH 1/4] fix #2097 by adding GetHttpContext to HubConnectionContext (#2099) --- .../GetHttpContextExtensions.cs | 30 +++++++++ .../HubCallerContextExtensions.cs | 16 ----- .../HeaderUserIdProvider.cs | 16 +++++ .../HubConnectionTests.cs | 40 ++++++++++-- .../Hubs.cs | 5 ++ .../Startup.cs | 1 + .../HubConnectionHandlerTestUtils/Hubs.cs | 2 +- .../HubConnectionHandlerTests.cs | 63 +++++++++++++++++++ 8 files changed, 151 insertions(+), 22 deletions(-) create mode 100644 src/Microsoft.AspNetCore.SignalR/GetHttpContextExtensions.cs delete mode 100644 src/Microsoft.AspNetCore.SignalR/HubCallerContextExtensions.cs create mode 100644 test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HeaderUserIdProvider.cs diff --git a/src/Microsoft.AspNetCore.SignalR/GetHttpContextExtensions.cs b/src/Microsoft.AspNetCore.SignalR/GetHttpContextExtensions.cs new file mode 100644 index 0000000000..f2a076b7f9 --- /dev/null +++ b/src/Microsoft.AspNetCore.SignalR/GetHttpContextExtensions.cs @@ -0,0 +1,30 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Connections.Features; + +namespace Microsoft.AspNetCore.SignalR +{ + public static class GetHttpContextExtensions + { + public static HttpContext GetHttpContext(this HubCallerContext connection) + { + if (connection == null) + { + throw new ArgumentNullException(nameof(connection)); + } + return connection.Features.Get()?.HttpContext; + } + + public static HttpContext GetHttpContext(this HubConnectionContext connection) + { + if (connection == null) + { + throw new ArgumentNullException(nameof(connection)); + } + return connection.Features.Get()?.HttpContext; + } + } +} diff --git a/src/Microsoft.AspNetCore.SignalR/HubCallerContextExtensions.cs b/src/Microsoft.AspNetCore.SignalR/HubCallerContextExtensions.cs deleted file mode 100644 index ab1754b972..0000000000 --- a/src/Microsoft.AspNetCore.SignalR/HubCallerContextExtensions.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Http.Connections.Features; - -namespace Microsoft.AspNetCore.SignalR -{ - public static class HubCallerContextExtensions - { - public static HttpContext GetHttpContext(this HubCallerContext connection) - { - return connection.Features.Get()?.HttpContext; - } - } -} diff --git a/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HeaderUserIdProvider.cs b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HeaderUserIdProvider.cs new file mode 100644 index 0000000000..aec978c6df --- /dev/null +++ b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HeaderUserIdProvider.cs @@ -0,0 +1,16 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests +{ + internal class HeaderUserIdProvider : IUserIdProvider + { + public static readonly string HeaderName = "Super-Insecure-UserName"; + + public string GetUserId(HubConnectionContext connection) + { + // Super-insecure user id provider :). Don't use this for anything real! + return connection.GetHttpContext()?.Request?.Headers?[HeaderName]; + } + } +} diff --git a/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs index 85cff50b24..ff6b2cbf04 100644 --- a/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/HubConnectionTests.cs @@ -864,15 +864,14 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests } } - [Theory] - [MemberData(nameof(TransportTypes))] - public async Task CheckHttpConnectionFeatures(HttpTransportType transportType) + [Fact] + public async Task CheckHttpConnectionFeatures() { - using (StartVerifableLog(out var loggerFactory, $"{nameof(CheckHttpConnectionFeatures)}_{transportType}")) + using (StartVerifableLog(out var loggerFactory)) { var hubConnection = new HubConnectionBuilder() .WithLoggerFactory(loggerFactory) - .WithUrl(ServerFixture.Url + "/default", transportType) + .WithUrl(ServerFixture.Url + "/default") .Build(); try { @@ -901,6 +900,37 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests } } + [Fact] + public async Task UserIdProviderCanAccessHttpContext() + { + using (StartVerifableLog(out var loggerFactory)) + { + var hubConnection = new HubConnectionBuilder() + .WithLoggerFactory(loggerFactory) + .WithUrl(ServerFixture.Url + "/default", options => + { + options.Headers.Add(HeaderUserIdProvider.HeaderName, "SuperAdmin"); + }) + .Build(); + try + { + await hubConnection.StartAsync().OrTimeout(); + + var userIdentifier = await hubConnection.InvokeAsync(nameof(TestHub.GetUserIdentifier)).OrTimeout(); + Assert.Equal("SuperAdmin", userIdentifier); + } + catch (Exception ex) + { + loggerFactory.CreateLogger().LogError(ex, "{ExceptionType} from test", ex.GetType().FullName); + throw; + } + finally + { + await hubConnection.DisposeAsync().OrTimeout(); + } + } + } + [Fact] public async Task NegotiationSkipsServerSentEventsWhenUsingBinaryProtocol() { diff --git a/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/Hubs.cs b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/Hubs.cs index 03fc3ea45a..3e4fb69a3c 100644 --- a/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/Hubs.cs +++ b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/Hubs.cs @@ -37,6 +37,11 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests await Clients.Client(Context.ConnectionId).SendAsync("NoClientHandler"); } + public string GetUserIdentifier() + { + return Context.UserIdentifier; + } + public IEnumerable GetHeaderValues(string[] headerNames) { var context = Context.GetHttpContext(); diff --git a/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/Startup.cs b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/Startup.cs index 93865dec67..81a67d13a4 100644 --- a/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/Startup.cs +++ b/test/Microsoft.AspNetCore.SignalR.Client.FunctionalTests/Startup.cs @@ -25,6 +25,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests options.EnableDetailedErrors = true; }) .AddMessagePackProtocol(); + services.AddSingleton(); services.AddAuthorization(options => { options.AddPolicy(JwtBearerDefaults.AuthenticationScheme, policy => diff --git a/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Hubs.cs b/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Hubs.cs index 514d069757..2ac5a70512 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Hubs.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTestUtils/Hubs.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; diff --git a/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.cs b/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.cs index 900df9778a..e3068ffd0e 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests/HubConnectionHandlerTests.cs @@ -1706,6 +1706,57 @@ namespace Microsoft.AspNetCore.SignalR.Tests } } + [Fact] + public async Task ConnectionUserIdIsAssignedByUserIdProvider() + { + var firstRequest = true; + var userIdProvider = new TestUserIdProvider(c => + { + if (firstRequest) + { + firstRequest = false; + return "client1"; + } + else + { + return "client2"; + } + }); + var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(services => + { + services.AddSingleton(userIdProvider); + }); + var connectionHandler = serviceProvider.GetService>(); + + using (var client1 = new TestClient()) + using (var client2 = new TestClient()) + { + var connectionHandlerTask1 = await client1.ConnectAsync(connectionHandler); + var connectionHandlerTask2 = await client2.ConnectAsync(connectionHandler); + + await client1.Connected.OrTimeout(); + await client2.Connected.OrTimeout(); + + await client2.SendInvocationAsync(nameof(MethodHub.SendToMultipleUsers), new[] { "client1" }, "Hi!").OrTimeout(); + + var message = (InvocationMessage)await client1.ReadAsync().OrTimeout(); + + Assert.Equal("Send", message.Target); + Assert.Collection(message.Arguments, arg => Assert.Equal("Hi!", arg)); + + client1.Dispose(); + client2.Dispose(); + + await connectionHandlerTask1.OrTimeout(); + await connectionHandlerTask2.OrTimeout(); + + // Read the completion, then we should have nothing left in client2's queue + Assert.IsType(client2.TryRead()); + Assert.IsType(client2.TryRead()); + Assert.Null(client2.TryRead()); + } + } + private class CustomFormatter : IFormatterResolver { public IMessagePackFormatter GetFormatter() @@ -2141,5 +2192,17 @@ namespace Microsoft.AspNetCore.SignalR.Tests { public HttpContext HttpContext { get; set; } } + + private class TestUserIdProvider : IUserIdProvider + { + private readonly Func _getUserId; + + public TestUserIdProvider(Func getUserId) + { + _getUserId = getUserId; + } + + public string GetUserId(HubConnectionContext connection) => _getUserId(connection); + } } } From 21b41a83769158fa49fd05560f34ce12d829a490 Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Thu, 19 Apr 2018 22:36:36 -0700 Subject: [PATCH 2/4] Update dependencies.props [auto-updated: dependencies] --- build/dependencies.props | 120 +++++++++++++++++++-------------------- korebuild-lock.txt | 4 +- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index ca4a4a8c25..a8dae6657d 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,77 +1,77 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 0.10.13 3.1.0 - 2.1.0-preview3-17018 + 2.1.0-rc1-15774 1.7.3.4 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-a-preview3-inherent-keep-alive-bool-17670 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 0.5.0-preview2-32233 - 2.1.0-a-preview3-inherent-keep-alive-bool-17670 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 4.5.0-preview3-26413-02 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 - 2.1.0-preview3-32233 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 0.5.0-preview2-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 4.5.0-rc1-26419-03 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 + 2.1.0-rc1-30613 2.0.0 - 2.1.0-preview3-26413-05 + 2.1.0-rc1-26419-02 15.6.1 - 2.0.1 4.7.49 + 2.0.1 11.0.2 1.2.4 - 4.5.0-preview3-26413-02 - 4.5.0-preview3-26413-02 - 4.5.0-preview3-26413-02 - 4.5.0-preview3-26413-02 + 4.5.0-rc1-26419-03 + 4.5.0-rc1-26419-03 + 4.5.0-rc1-26419-03 + 4.5.0-rc1-26419-03 3.1.1 4.3.0 - 4.5.0-preview3-26413-02 - 4.5.0-preview3-26413-02 - 4.5.0-preview3-26413-02 + 4.5.0-rc1-26419-03 + 4.5.0-rc1-26419-03 + 4.5.0-rc1-26419-03 2.3.1 2.4.0-beta.1.build3945 diff --git a/korebuild-lock.txt b/korebuild-lock.txt index ce2f277c53..d35f5d62cf 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview3-17018 -commithash:af264ca131f212b5ba8aafbc5110fc0fc510a2be +version:2.1.0-rc1-15774 +commithash:ed5ca9de3c652347dbb0158a9a65eff3471d2114 From 5516a969e36c11550bdad94bbf735ebbd0c7d9d0 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 20 Apr 2018 20:53:01 +1200 Subject: [PATCH 3/4] Change Hub and friends to abstract (#2108) --- src/Microsoft.AspNetCore.SignalR.Core/DynamicHub.cs | 2 +- src/Microsoft.AspNetCore.SignalR.Core/Hub.cs | 2 +- src/Microsoft.AspNetCore.SignalR.Core/Hub`T.cs | 2 +- .../DefaultHubActivatorTests.cs | 6 +++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNetCore.SignalR.Core/DynamicHub.cs b/src/Microsoft.AspNetCore.SignalR.Core/DynamicHub.cs index 8571b1f3ad..f37460cacd 100644 --- a/src/Microsoft.AspNetCore.SignalR.Core/DynamicHub.cs +++ b/src/Microsoft.AspNetCore.SignalR.Core/DynamicHub.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.SignalR { - public class DynamicHub : Hub + public abstract class DynamicHub : Hub { private DynamicHubClients _clients; diff --git a/src/Microsoft.AspNetCore.SignalR.Core/Hub.cs b/src/Microsoft.AspNetCore.SignalR.Core/Hub.cs index 7075660886..63a36fe92a 100644 --- a/src/Microsoft.AspNetCore.SignalR.Core/Hub.cs +++ b/src/Microsoft.AspNetCore.SignalR.Core/Hub.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace Microsoft.AspNetCore.SignalR { - public class Hub : IDisposable + public abstract class Hub : IDisposable { private bool _disposed; private IHubCallerClients _clients; diff --git a/src/Microsoft.AspNetCore.SignalR.Core/Hub`T.cs b/src/Microsoft.AspNetCore.SignalR.Core/Hub`T.cs index 8bce9b3507..5463b7c35e 100644 --- a/src/Microsoft.AspNetCore.SignalR.Core/Hub`T.cs +++ b/src/Microsoft.AspNetCore.SignalR.Core/Hub`T.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.SignalR.Internal; namespace Microsoft.AspNetCore.SignalR { - public class Hub : Hub where T : class + public abstract class Hub : Hub where T : class { private IHubCallerClients _clients; diff --git a/test/Microsoft.AspNetCore.SignalR.Tests/DefaultHubActivatorTests.cs b/test/Microsoft.AspNetCore.SignalR.Tests/DefaultHubActivatorTests.cs index dd75dd3d51..5584031e35 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests/DefaultHubActivatorTests.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests/DefaultHubActivatorTests.cs @@ -11,11 +11,15 @@ namespace Microsoft.AspNetCore.SignalR.Tests { public class DefaultHubActivatorTests { + public class CreatableHub : Hub + { + } + [Fact] public void HubCreatedIfNotResolvedFromServiceProvider() { Assert.NotNull( - new DefaultHubActivator(Mock.Of()).Create()); + new DefaultHubActivator(Mock.Of()).Create()); } [Fact] From 9101ab636bfb3f8e72a665fa4f95bcf818354889 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Fri, 20 Apr 2018 08:21:04 -0700 Subject: [PATCH 4/4] Always check for WebSockets close (#2100) --- .../Internal/WebSocketsTransport.cs | 6 +++--- .../Internal/Transports/WebSocketsTransport.cs | 6 +++--- .../VerifiableServerLoggedTest.cs | 8 -------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/Microsoft.AspNetCore.Http.Connections.Client/Internal/WebSocketsTransport.cs b/src/Microsoft.AspNetCore.Http.Connections.Client/Internal/WebSocketsTransport.cs index c6ebeabce3..cfa225b46d 100644 --- a/src/Microsoft.AspNetCore.Http.Connections.Client/Internal/WebSocketsTransport.cs +++ b/src/Microsoft.AspNetCore.Http.Connections.Client/Internal/WebSocketsTransport.cs @@ -198,7 +198,6 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal while (true) { #if NETCOREAPP2_1 - // Do a 0 byte read so that idle connections don't allocate a buffer when waiting for a read var result = await socket.ReceiveAsync(Memory.Empty, CancellationToken.None); if (result.MessageType == WebSocketMessageType.Close) @@ -223,7 +222,8 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal // Exceptions are handled above where the send and receive tasks are being run. var receiveResult = await socket.ReceiveAsync(arraySegment, CancellationToken.None); - +#endif + // Need to check again for NetCoreApp2.1 because a close can happen between a 0-byte read and the actual read if (receiveResult.MessageType == WebSocketMessageType.Close) { Log.WebSocketClosed(_logger, _webSocket.CloseStatus); @@ -235,7 +235,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal return; } -#endif + Log.MessageReceived(_logger, receiveResult.MessageType, receiveResult.Count, receiveResult.EndOfMessage); _application.Output.Advance(receiveResult.Count); diff --git a/src/Microsoft.AspNetCore.Http.Connections/Internal/Transports/WebSocketsTransport.cs b/src/Microsoft.AspNetCore.Http.Connections/Internal/Transports/WebSocketsTransport.cs index b3c7126834..e77dbfe102 100644 --- a/src/Microsoft.AspNetCore.Http.Connections/Internal/Transports/WebSocketsTransport.cs +++ b/src/Microsoft.AspNetCore.Http.Connections/Internal/Transports/WebSocketsTransport.cs @@ -154,7 +154,6 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports var memory = _application.Output.GetMemory(); #if NETCOREAPP2_1 - // Because we checked the CloseStatus from the 0 byte read above, we don't need to check again after reading var receiveResult = await socket.ReceiveAsync(memory, CancellationToken.None); #else var isArray = MemoryMarshal.TryGetArray(memory, out var arraySegment); @@ -162,12 +161,13 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports // Exceptions are handled above where the send and receive tasks are being run. var receiveResult = await socket.ReceiveAsync(arraySegment, CancellationToken.None); - +#endif + // Need to check again for NetCoreApp2.1 because a close can happen between a 0-byte read and the actual read if (receiveResult.MessageType == WebSocketMessageType.Close) { return; } -#endif + Log.MessageReceived(_logger, receiveResult.MessageType, receiveResult.Count, receiveResult.EndOfMessage); _application.Output.Advance(receiveResult.Count); diff --git a/test/Microsoft.AspNetCore.SignalR.Tests.Utils/VerifiableServerLoggedTest.cs b/test/Microsoft.AspNetCore.SignalR.Tests.Utils/VerifiableServerLoggedTest.cs index 6f64b4bd81..ab0acf1abe 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests.Utils/VerifiableServerLoggedTest.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests.Utils/VerifiableServerLoggedTest.cs @@ -31,14 +31,6 @@ namespace Microsoft.AspNetCore.SignalR.Tests return true; } - // Suppress https://github.com/aspnet/SignalR/issues/2069 - if (writeContext.LoggerName == "Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager" && - writeContext.Message.StartsWith("Failed disposing connection") && - writeContext.Exception is WebSocketException) - { - return true; - } - return false; }; }