diff --git a/src/MaaWpfGui/Helper/ETagCache.cs b/src/MaaWpfGui/Helper/ETagCache.cs index 9f44669890..52c0dc0bda 100644 --- a/src/MaaWpfGui/Helper/ETagCache.cs +++ b/src/MaaWpfGui/Helper/ETagCache.cs @@ -89,9 +89,8 @@ namespace MaaWpfGui.Helper var etag = force ? string.Empty : Get(url); Dictionary headers = new Dictionary { - { - "Accept", "application/octet-stream" - }, + { "Accept", "application/octet-stream" }, + { "Connection", "close" }, }; if (!string.IsNullOrEmpty(etag)) diff --git a/src/MaaWpfGui/Services/Web/HttpService.cs b/src/MaaWpfGui/Services/Web/HttpService.cs index cf65b416f6..a956556f6f 100644 --- a/src/MaaWpfGui/Services/Web/HttpService.cs +++ b/src/MaaWpfGui/Services/Web/HttpService.cs @@ -91,6 +91,8 @@ namespace MaaWpfGui.Services.Web } } + request.Headers.ConnectionClose = true; + var stopwatch = Stopwatch.StartNew(); var response = await _client.SendAsync(request).ConfigureAwait(false); stopwatch.Stop();