Merge pull request #4073 from Bond-009/useafterdispose
Fix ObjectDisposedException
This commit is contained in:
commit
3aee338066
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user