Merge pull request #4073 from Bond-009/useafterdispose

Fix ObjectDisposedException
pull/4094/head
Anthony Lavado 4 years ago committed by GitHub
commit 3aee338066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);
}
}
}

Loading…
Cancel
Save