diff --git a/src/Microsoft.AspNetCore.SignalR.Core/Internal/AsyncEnumeratorAdapters.cs b/src/Microsoft.AspNetCore.SignalR.Core/Internal/AsyncEnumeratorAdapters.cs index a04eafba56..adcb911639 100644 --- a/src/Microsoft.AspNetCore.SignalR.Core/Internal/AsyncEnumeratorAdapters.cs +++ b/src/Microsoft.AspNetCore.SignalR.Core/Internal/AsyncEnumeratorAdapters.cs @@ -18,9 +18,6 @@ namespace Microsoft.AspNetCore.SignalR.Internal var subscription = observable.Subscribe(new ChannelObserver(channel.Writer, cancellationToken)); - // Dispose the subscription when the token is cancelled - cancellationToken.Register(state => ((IDisposable)state).Dispose(), subscription); - // Make sure the subscription is disposed when enumeration is completed. return new AsyncEnumerator(channel.Reader, cancellationToken, subscription); }