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
1 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ namespace Emby.Dlna.PlayTo
LoadOptions.PreserveWhitespace);
}
private Task<HttpResponseMessage> PostSoapDataAsync(
private async Task<HttpResponseMessage> PostSoapDataAsync(
string url,
string soapAction,
string postData,
@ -126,7 +126,7 @@ namespace Emby.Dlna.PlayTo
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);
}
}
}