mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix #1433
This commit is contained in:
@@ -168,9 +168,14 @@ internal sealed partial class PackageConverter
|
||||
{
|
||||
try
|
||||
{
|
||||
using (Stream remoteSteam = await httpClient.GetStreamAsync(pkgVersionUrl).ConfigureAwait(false))
|
||||
// Server might close the connection shortly,
|
||||
// we have to cache the content immediately.
|
||||
using (HttpResponseMessage responseMessage = await httpClient.GetAsync(pkgVersionUrl, HttpCompletionOption.ResponseContentRead).ConfigureAwait(false))
|
||||
{
|
||||
return await GetVersionItemsAsync(remoteSteam).ConfigureAwait(false);
|
||||
using (Stream remoteSteam = await responseMessage.Content.ReadAsStreamAsync().ConfigureAwait(false))
|
||||
{
|
||||
return await GetVersionItemsAsync(remoteSteam).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
|
||||
Reference in New Issue
Block a user