-
Notifications
You must be signed in to change notification settings - Fork 2.1k
CancellationTokenSource is not Disposed in cache tag helpers #5649
Comments
For https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.TagHelpers/CacheTagHelper.cs#L80 I'm not sure what the intention is. https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.TagHelpers/DistributedCacheTagHelper.cs#L72 is definitely wrong - the CTS isn't even used, so we can just delete it. @sebastienros can you take a look? |
@sebastienros - can you take a look to see if we need to do something here? Looks like there's at least a small change we need to make? |
Based on our usage of the My gut feeling would be to actually not call |
Inside https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.TagHelpers/CacheTagHelper.cs#L80 (ProcessAsync method) there is a CancellationTokenSource instantiation without proper Dispose call.
Also, https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.TagHelpers/DistributedCacheTagHelper.cs#L72 creates a new CancellationTokenSource which is not used anywhere.
I believe these places should be fixed.
The text was updated successfully, but these errors were encountered: