Ensure the correct use of disposable parsed documents

This commit is contained in:
Bogdan
2023-10-04 05:36:39 +03:00
parent 93ec6cf89b
commit 19a196e2c7
34 changed files with 63 additions and 63 deletions

View File

@@ -73,7 +73,7 @@ namespace NzbDrone.Core.Indexers.Definitions
if (CheckIfLoginNeeded(response))
{
var parser = new HtmlParser();
var dom = parser.ParseDocument(response.Content);
using var dom = parser.ParseDocument(response.Content);
var errorMessages = dom
.QuerySelectorAll("table.lista td.lista span[style*=\"#FF0000\"], table.lista td.header:contains(\"login attempts\")")
.Select(r => r.TextContent.Trim())