Do not dispose WebBrowser.HtmlDocumentResponse

We're disposing inner document already, and this can't be disposed too early
This commit is contained in:
JustArchi 2020-04-18 14:12:45 +02:00
parent 63c8a6540e
commit 4b7369661c
2 changed files with 3 additions and 5 deletions

View file

@ -472,7 +472,7 @@ namespace ArchiSteamFarm {
}
}
using WebBrowser.HtmlDocumentResponse response = await WebLimitRequest(host, async () => await WebBrowser.UrlGetToHtmlDocument(host + request).ConfigureAwait(false)).ConfigureAwait(false);
WebBrowser.HtmlDocumentResponse response = await WebLimitRequest(host, async () => await WebBrowser.UrlGetToHtmlDocument(host + request).ConfigureAwait(false)).ConfigureAwait(false);
if (response == null) {
return null;
@ -809,7 +809,7 @@ namespace ArchiSteamFarm {
}
}
using WebBrowser.HtmlDocumentResponse response = await WebLimitRequest(host, async () => await WebBrowser.UrlPostToHtmlDocument(host + request, data, referer).ConfigureAwait(false)).ConfigureAwait(false);
WebBrowser.HtmlDocumentResponse response = await WebLimitRequest(host, async () => await WebBrowser.UrlPostToHtmlDocument(host + request, data, referer).ConfigureAwait(false)).ConfigureAwait(false);
if (response == null) {
return null;

View file

@ -813,7 +813,7 @@ namespace ArchiSteamFarm {
}
}
public sealed class HtmlDocumentResponse : BasicResponse, IDisposable {
public sealed class HtmlDocumentResponse : BasicResponse {
[PublicAPI]
public readonly IDocument Content;
@ -831,8 +831,6 @@ namespace ArchiSteamFarm {
Content = document;
}
public void Dispose() => Content?.Dispose();
[ItemCanBeNull]
internal static async Task<HtmlDocumentResponse> Create([NotNull] StreamResponse streamResponse) {
if (streamResponse == null) {