Merge pull request #4073 from Bond-009/useafterdispose

Fix ObjectDisposedException
This commit is contained in:
Anthony Lavado 2020-09-07 19:39:42 -04:00 committed by GitHub
commit 3aee338066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ namespace Emby.Dlna.PlayTo
LoadOptions.PreserveWhitespace); LoadOptions.PreserveWhitespace);
} }
private Task<HttpResponseMessage> PostSoapDataAsync( private async Task<HttpResponseMessage> PostSoapDataAsync(
string url, string url,
string soapAction, string soapAction,
string postData, string postData,
@ -126,7 +126,7 @@ namespace Emby.Dlna.PlayTo
options.Content = new StringContent(postData, Encoding.UTF8, MediaTypeNames.Text.Xml); options.Content = new StringContent(postData, Encoding.UTF8, MediaTypeNames.Text.Xml);
return _httpClientFactory.CreateClient(NamedClient.Default).SendAsync(options, HttpCompletionOption.ResponseHeadersRead, cancellationToken); return await _httpClientFactory.CreateClient(NamedClient.Default).SendAsync(options, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
} }
} }
} }